public class CompressedFile extends Object
In this class, the data on the disk can be one of two states:
compress()
.Constructor and Description |
---|
CompressedFile(File file) |
Modifier and Type | Method and Description |
---|---|
void |
compress()
Asynchronously schedules the compression of this file.
|
String |
loadAsString()
Loads the file content as a string.
|
InputStream |
read()
Reads the contents of a file.
|
OutputStream |
write()
Gets the OutputStream to write to the file.
|
public CompressedFile(File file)
public OutputStream write() throws IOException
IOException
public InputStream read() throws IOException
IOException
public String loadAsString() throws IOException
IOException
public void compress()
Once the file is compressed, the original will be removed and the further reading will be done from the compressed stream.
Copyright © 2004–2021. All rights reserved.