Package org.teiid.core.util
Class MultiArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.teiid.core.util.MultiArrayOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class MultiArrayOutputStream extends OutputStream
A dynamic buffer that limits copying overhead
-
-
Constructor Summary
Constructors Constructor Description MultiArrayOutputStream(int initialSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[][]
getBuffers()
int
getCount()
int
getIndex()
void
reset(int newIndex)
void
write(byte[] b, int off, int len)
void
write(int b)
void
writeTo(DataOutput out)
-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write
-
-
-
-
Method Detail
-
reset
public void reset(int newIndex)
-
write
public void write(int b) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
writeTo
public void writeTo(DataOutput out) throws IOException
- Throws:
IOException
-
getCount
public int getCount()
-
getBuffers
public byte[][] getBuffers()
-
getIndex
public int getIndex()
-
-