public class BufferingOutputStream extends OutputStream
| Constructor and Description |
|---|
BufferingOutputStream(int maxMemorySize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
deleteTempFileIfExists()
If this is called before the inputstream is used, then the inputstream
will fail to open (because it needs the file!!) So should only use in
exception handlers
|
void |
flush() |
byte[] |
getInMemoryData()
Gets the data currently held in memory
|
InputStream |
getInputStream() |
long |
getSize() |
boolean |
isCompleteInMemory()
returns true if the data is completely held in memory
|
void |
setOnClose(Runnable r) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public InputStream getInputStream()
public void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic long getSize()
public void setOnClose(Runnable r)
public boolean isCompleteInMemory()
public byte[] getInMemoryData()
public void deleteTempFileIfExists()