|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.util.CompressedFile
public class CompressedFile
Represents write-once read-many file that can be optiionally compressed to save disk space. This is used for console output and other bulky data.
In this class, the data on the disk can be one of two states:
compress()
.
Constructor Summary | |
---|---|
CompressedFile(File file)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompressedFile(File file)
Method Detail |
---|
public OutputStream write() throws FileNotFoundException
FileNotFoundException
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |