|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcodesimian.Files
public class Files
problem: not all CSs are Serializable
| Nested Class Summary | |
|---|---|
static interface |
Files.DownloadListener
Watches a download of a file or URL many times as more and more bytes are downloaded. |
static class |
Files.GrowingByteArrayInputStream
same as ByteArrayInputStream except ByteArrayInputStream.count can be set by a function, which causes more and more bytes to be available (or less?), without replacing the byte[] array. |
static class |
Files.LoadCSFromFile
Puts the CS from the file in param0. |
static class |
Files.SaveCSToFile
param0 is the CS to be Serialized and saved to file. |
static class |
Files.TextFileWriter
Maps a CS's params to a file. |
| Constructor Summary | |
|---|---|
Files()
|
|
| Method Summary | |
|---|---|
static byte[] |
download(java.io.InputStream in)
later, modify this to have a progress bar if data is large. |
static byte[] |
download(java.lang.String fileNameOrURL)
later, modify this to have a progress bar if data is large |
static byte[] |
download(java.lang.String fileNameOrURL,
Files.DownloadListener listener)
Downloads the bytes from a file or URL, and tells a Files.DownloadListener about the progress downloading. |
static byte[] |
downloadTEST(java.lang.String fileNameOrURL,
Files.DownloadListener listener)
|
static java.io.InputStream |
fileNameOrURLToInputStream(java.lang.String fileNameOrURL)
|
static byte[] |
getBytesFromFile(java.io.File file)
|
static java.util.zip.ZipInputStream |
getFolderOrURLAsZIP(java.lang.String folderNameOrURL)
if folderNameOrURL is the name of a local folder (directory) then returns a ZIP file containing the files and subfolders of the specified folder. |
static void |
main(java.lang.String[] a)
|
static void |
saveBytesToFile(byte[] data,
java.io.File file)
|
static java.io.File |
suggestNonexistantJarFile(java.io.File folder)
returns the first File with name CodeSimianXXXX.jar where XXXX is a number (2 or higher) and that file does not exist on the hard-drive in that folder. |
static void |
upload(java.io.OutputStream out,
byte[] data)
later, modify this to have a progress bar if data is large |
static void |
upload(java.lang.String fileNameOrURL,
byte[] data)
later, modify this to have a progress bar if data is large |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Files()
| Method Detail |
|---|
public static void saveBytesToFile(byte[] data,
java.io.File file)
throws java.io.IOException
java.io.IOException
public static byte[] getBytesFromFile(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic static java.util.zip.ZipInputStream getFolderOrURLAsZIP(java.lang.String folderNameOrURL)
public static byte[] download(java.lang.String fileNameOrURL)
public static byte[] download(java.io.InputStream in)
public static void upload(java.lang.String fileNameOrURL,
byte[] data)
public static void upload(java.io.OutputStream out,
byte[] data)
public static void main(java.lang.String[] a)
throws java.io.IOException
java.io.IOException
public static java.io.InputStream fileNameOrURLToInputStream(java.lang.String fileNameOrURL)
throws java.io.IOException
java.io.IOException
public static byte[] downloadTEST(java.lang.String fileNameOrURL,
Files.DownloadListener listener)
public static byte[] download(java.lang.String fileNameOrURL,
Files.DownloadListener listener)
public static java.io.File suggestNonexistantJarFile(java.io.File folder)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||