Package edu.uiuc.ncsa.qdl.vfs
Class FileEntries
- java.lang.Object
-
- edu.uiuc.ncsa.qdl.vfs.FileEntries
-
public class FileEntries extends Object
Created by Jeff Gaynor
on 2/19/20 at 6:19 AM
-
-
Constructor Summary
Constructors Constructor Description FileEntries()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addFile(net.sf.json.JSONObject config, FileEntry fileEntry)
static void
addFile(net.sf.json.JSONObject config, String id, File file, int type)
protected static void
addFile(net.sf.json.JSONObject config, net.sf.json.JSONObject fileEntry)
static net.sf.json.JSONObject
createConfig()
static FileEntry
fileToEntry(File file, int type)
static FileEntry
fileToEntry(String path, int type)
static FileEntry
fromJSON(net.sf.json.JSONObject json)
Take and entry from the library and return a file entry.static boolean
isBinary(File f, int type)
static FileEntry
toEntry(ZipEntry zipEntry, byte[] content, int type)
static FileEntry
toEntryWithBinary(String id, File f)
static FileEntry
toEntryWithInputStream(String id, File f)
static net.sf.json.JSONObject
toJSON(FileEntry fileEntry)
static net.sf.json.JSONObject
toJSON(File f, int type)
static net.sf.json.JSONObject
toJSON(String id, File f, int type)
-
-
-
Field Detail
-
FILES_TAG
public static String FILES_TAG
-
-
Method Detail
-
toJSON
public static net.sf.json.JSONObject toJSON(FileEntry fileEntry) throws Throwable
- Throws:
Throwable
-
toEntry
public static FileEntry toEntry(ZipEntry zipEntry, byte[] content, int type) throws Throwable
- Throws:
Throwable
-
toEntryWithInputStream
public static FileEntry toEntryWithInputStream(String id, File f) throws Throwable
- Throws:
Throwable
-
toEntryWithBinary
public static FileEntry toEntryWithBinary(String id, File f) throws Throwable
- Throws:
Throwable
-
toJSON
public static net.sf.json.JSONObject toJSON(String id, File f, int type) throws Throwable
- Throws:
Throwable
-
toJSON
public static net.sf.json.JSONObject toJSON(File f, int type) throws Throwable
- Throws:
Throwable
-
fileToEntry
public static FileEntry fileToEntry(File file, int type) throws Throwable
- Throws:
Throwable
-
fileToEntry
public static FileEntry fileToEntry(String path, int type) throws Throwable
- Throws:
Throwable
-
fromJSON
public static FileEntry fromJSON(net.sf.json.JSONObject json)
Take and entry from the library and return a file entry.- Parameters:
json
-- Returns:
-
isBinary
public static boolean isBinary(File f, int type) throws IOException
- Throws:
IOException
-
createConfig
public static net.sf.json.JSONObject createConfig()
-
addFile
public static void addFile(net.sf.json.JSONObject config, String id, File file, int type) throws Throwable
- Throws:
Throwable
-
addFile
protected static void addFile(net.sf.json.JSONObject config, net.sf.json.JSONObject fileEntry) throws Throwable
- Throws:
Throwable
-
-