Package com.yahoo.io
Class GrowableBufferOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.yahoo.io.GrowableBufferOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class GrowableBufferOutputStream extends OutputStream
- Author:
- Bjørn Borud
-
-
Constructor Summary
Constructors Constructor Description GrowableBufferOutputStream(int bufferSize, int maxBuffers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
channelWrite(WritableByteChannel channel)
void
clear()
void
clearAll()
void
clearCache()
void
close()
void
flush()
ByteBuffer[]
getWritableBuffers()
int
numWritableBuffers()
String
toString()
int
writableSize()
void
write(byte[] b)
void
write(byte[] cbuf, int off, int len)
void
write(int b)
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Method Detail
-
write
public void write(byte[] cbuf, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(int b)
- Specified by:
write
in classOutputStream
-
flush
public void flush()
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
-
channelWrite
public int channelWrite(WritableByteChannel channel) throws IOException
- Throws:
IOException
-
numWritableBuffers
public int numWritableBuffers()
-
clear
public void clear()
-
clearCache
public void clearCache()
-
clearAll
public void clearAll()
-
writableSize
public int writableSize()
-
getWritableBuffers
public ByteBuffer[] getWritableBuffers()
-
-