| Modifier and Type | Class and Description |
|---|---|
| public static enum | |
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final File | |
| private FileInputStream | |
| private FileOutputStream | |
| private InputStreamReader | |
| private OutputStreamWriter | |
| private BufferedReader | |
| private FileWrapper. | |
| private BufferedWriter |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public void | |
| public void | copyTo(FileWrapper
The FileWrapper to copy data to. target, byte[] The buffer to use for copying the files. buffer)Copy this file to target using buffer to hold data. |
| public void | |
| public String | |
| public FileWrapper. | |
| public String | |
| pack-priv boolean | isYoungerThan(FileWrapper fw)
Returns true if either this FileWrapper does not exist, or if the lastModificationTime of this FileWrapper is earlier than that of fw. |
| public void | |
| public byte[] | |
| public String | |
| public String | |
| public void | |
| public void |
| file | back to summary |
|---|---|
| private final File file | |
| fis | back to summary |
|---|---|
| private FileInputStream fis | |
| fos | back to summary |
|---|---|
| private FileOutputStream fos | |
| isr | back to summary |
|---|---|
| private InputStreamReader isr | |
| osw | back to summary |
|---|---|
| private OutputStreamWriter osw | |
| reader | back to summary |
|---|---|
| private BufferedReader reader | |
| state | back to summary |
|---|---|
| private FileWrapper. | |
| writer | back to summary |
|---|---|
| private BufferedWriter writer | |
| FileWrapper | back to summary |
|---|---|
| public FileWrapper(final File file) Create a new FileWrapper for the given File. Represents the same file in the filesystem as the underlying File object. getBase() return the FileWrapper for the file system root.
| |
| FileWrapper | back to summary |
|---|---|
| public FileWrapper(String str) | |
| FileWrapper | back to summary |
|---|---|
| public FileWrapper(File root, String str) | |
| canWrite | back to summary |
|---|---|
| public boolean canWrite() | |
| close | back to summary |
|---|---|
| public void close() Implements java. Close the file, and set its state to CLOSED. This method does not throw any exceptions.
| |
| copyTo | back to summary |
|---|---|
| public void copyTo(FileWrapper target, byte[] buffer) throws IOException Copy this file to target using buffer to hold data. Does not assume we are using text files.
| |
| delete | back to summary |
|---|---|
| public void delete() | |
| getAbsoluteName | back to summary |
|---|---|
| public String getAbsoluteName() | |
| getFileState | back to summary |
|---|---|
| public FileWrapper. | |
| getName | back to summary |
|---|---|
| public String getName() | |
| isYoungerThan | back to summary |
|---|---|
| pack-priv boolean isYoungerThan(FileWrapper fw) Returns true if either this FileWrapper does not exist, or if the lastModificationTime of this FileWrapper is earlier than that of fw. | |
| open | back to summary |
|---|---|
| public void open(final FileWrapper. Open the (text) file for I/O. There are two modes:
| |
| readAll | back to summary |
|---|---|
| public byte[] readAll() throws IOException | |
| readLine | back to summary |
|---|---|
| public String readLine() throws IOException Read the next line from the text file. File state must be FileState OPEN_FOR_READ. Returns null when at the end of file.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| writeAll | back to summary |
|---|---|
| public void writeAll(byte[] data) throws IOException | |
| writeLine | back to summary |
|---|---|
| public void writeLine(final String line) throws IOException Write the line to the end of the file, including a newline. File state must be FileState OPEN_FOR_WRITE.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final FileWrapper. | |
| public static final FileWrapper. | |
| public static final FileWrapper. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static FileWrapper. | |
| public static FileWrapper. |
| CLOSED | back to summary |
|---|---|
| public static final FileWrapper. | |
| OPEN_FOR_READ | back to summary |
|---|---|
| public static final FileWrapper. | |
| OPEN_FOR_WRITE | back to summary |
|---|---|
| public static final FileWrapper. | |
| FileState | back to summary |
|---|---|
| private FileState() | |
| valueOf | back to summary |
|---|---|
| public static FileWrapper. | |
| values | back to summary |
|---|---|
| public static FileWrapper. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final FileWrapper. | |
| public static final FileWrapper. | |
| public static final FileWrapper. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static FileWrapper. | |
| public static FileWrapper. |
| READ | back to summary |
|---|---|
| public static final FileWrapper. | |
| WRITE | back to summary |
|---|---|
| public static final FileWrapper. | |
| WRITE_EMPTY | back to summary |
|---|---|
| public static final FileWrapper. | |
| OpenMode | back to summary |
|---|---|
| private OpenMode() | |
| valueOf | back to summary |
|---|---|
| public static FileWrapper. | |
| values | back to summary |
|---|---|
| public static FileWrapper. | |