|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.sail.core.util.BinaryUtils
public class BinaryUtils
Constructor Summary | |
---|---|
BinaryUtils()
|
Method Summary | |
---|---|
static java.net.URL |
addToArchive(Pod pod,
java.util.zip.ZipOutputStream podArchiveOutputStream,
java.lang.String filename,
java.io.InputStream source)
|
static void |
cleanClosePodArchive(Pod pod,
java.util.jar.JarOutputStream podArchive)
TODO think of way to avoid this hack |
static java.io.File |
createTempDir(java.lang.String tempDirName)
|
static CurnitFile |
curnitFileForArgs(java.lang.String[] args)
|
static CurnitUuid |
curnitIdFromInt(int someInt)
Transform integer id into a valid curnit uuid |
static java.io.File |
fileForCommandArgument(java.lang.String path)
|
static Curnit |
loadCurnit(java.io.File file)
loads a curnit from a file, returns the curnit object |
static java.net.URL |
makeJarUrl(java.net.URL jarUrl,
java.lang.String pathInJar)
|
static java.util.jar.JarOutputStream |
newPodArchiveFor(Pod pod)
Note: ignores the previous archive associated with the pod |
static java.io.File |
tempCurnitArchive(PodUuid rootPodId)
|
static java.io.File |
tempFileForUrl(java.lang.String externalForm)
|
static java.io.File |
tempFileForUrl(java.net.URL url)
|
static java.io.File |
tempFileForUrl(java.net.URL url,
boolean deleteOnExit)
|
static java.net.URL |
toFileUrl(java.net.URL location)
Takes a URL that points to a resource within a JAR, unzips it onto the filesystem, and returns a file: url to it |
static java.net.URL |
urlForCommandArgument(java.lang.String path)
|
static void |
writeCurnit(CurnitUuid curnitId,
java.lang.String curnitTitle,
Pod rootPod,
java.io.OutputStream out)
Write to the output stream a curnit archive of a curnit with the specified curnit id, title and root pod |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryUtils()
Method Detail |
---|
public static java.net.URL toFileUrl(java.net.URL location) throws java.io.IOException
location
- points to a resource within a JAR
java.io.IOException
public static java.io.File createTempDir(java.lang.String tempDirName) throws java.io.IOException
tempDirName
- TODO
java.io.IOException
public static java.net.URL makeJarUrl(java.net.URL jarUrl, java.lang.String pathInJar)
public static java.io.File tempFileForUrl(java.lang.String externalForm) throws java.io.IOException
externalForm
-
java.io.IOException
public static java.io.File tempFileForUrl(java.net.URL url, boolean deleteOnExit) throws java.io.IOException
curnitArchiveUrl
- deleteOnExit
-
java.io.IOException
public static java.io.File tempFileForUrl(java.net.URL url) throws java.io.IOException
curnitArchiveUrl
-
java.io.IOException
public static java.io.File fileForCommandArgument(java.lang.String path) throws java.io.IOException
path
-
java.io.IOException
public static java.net.URL urlForCommandArgument(java.lang.String path) throws java.io.IOException
path
-
java.io.IOException
public static java.net.URL addToArchive(Pod pod, java.util.zip.ZipOutputStream podArchiveOutputStream, java.lang.String filename, java.io.InputStream source) throws java.io.IOException
java.io.IOException
public static java.util.jar.JarOutputStream newPodArchiveFor(Pod pod) throws java.io.IOException
pod
-
java.io.IOException
public static void cleanClosePodArchive(Pod pod, java.util.jar.JarOutputStream podArchive) throws java.io.IOException
pod
- podToArchive
-
java.io.IOException
public static CurnitFile curnitFileForArgs(java.lang.String[] args) throws java.io.IOException
args
-
java.io.IOException
public static void writeCurnit(CurnitUuid curnitId, java.lang.String curnitTitle, Pod rootPod, java.io.OutputStream out) throws java.lang.Exception
java.lang.Exception
public static CurnitUuid curnitIdFromInt(int someInt)
someInt
-
public static Curnit loadCurnit(java.io.File file) throws java.io.IOException, UnknownPodException
file
- - curnit archive file
java.io.IOException
UnknownPodException
public static java.io.File tempCurnitArchive(PodUuid rootPodId) throws java.io.IOException, java.io.FileNotFoundException, java.net.MalformedURLException
rootPodId
-
java.io.IOException
java.io.FileNotFoundException
java.net.MalformedURLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |