public class FileBufferedOutputStream extends OutputStream
| Modifier and Type | Class and Description |
|---|---|
protected class |
FileBufferedOutputStream.DataStream |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_INITIAL_MEMORY_BUFFER_SIZE |
static int |
DEFAULT_INPUT_BUFFER_LENGTH |
static String |
EXCEPTION_MESSAGE_KEY_OUTPUT_STREAM_ALREADY_CLOSED |
static int |
INFINIT_MEMORY_THRESHOLD |
static String |
PROPERTY_MEMORY_THRESHOLD
Specifies the maximum in-memory buffer length that triggers the creation of a temporary file on disk to store further content sent to this output stream.
|
| Constructor and Description |
|---|
FileBufferedOutputStream() |
FileBufferedOutputStream(int memoryThreshold) |
FileBufferedOutputStream(int memoryThreshold,
int initialMemoryBufferSize) |
FileBufferedOutputStream(int memoryThreshold,
int initialMemoryBufferSize,
int inputBufferLength) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
availableMemorySpace() |
void |
checkClosed() |
void |
close() |
void |
dispose() |
protected BufferedOutputStream |
ensureFileOutput() |
protected void |
finalize() |
void |
flush() |
InputStream |
getDataInputStream() |
int |
size() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeData(OutputStream out) |
writepublic static final String EXCEPTION_MESSAGE_KEY_OUTPUT_STREAM_ALREADY_CLOSED
public static final String PROPERTY_MEMORY_THRESHOLD
public static final int INFINIT_MEMORY_THRESHOLD
public static final int DEFAULT_INITIAL_MEMORY_BUFFER_SIZE
public static final int DEFAULT_INPUT_BUFFER_LENGTH
public FileBufferedOutputStream()
public FileBufferedOutputStream(int memoryThreshold)
public FileBufferedOutputStream(int memoryThreshold,
int initialMemoryBufferSize)
public FileBufferedOutputStream(int memoryThreshold,
int initialMemoryBufferSize,
int inputBufferLength)
public void write(int b)
throws IOException
write in class OutputStreamIOExceptionprotected int availableMemorySpace()
protected BufferedOutputStream ensureFileOutput() throws IOException, FileNotFoundException
IOExceptionFileNotFoundExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void checkClosed()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic int size()
public void writeData(OutputStream out) throws IOException
IOExceptionpublic void dispose()
protected void finalize()
throws Throwable
public InputStream getDataInputStream() throws IOException
IOExceptionCopyright © 2017. All rights reserved.