Package org.nustaq.serialization.util
Class FSTOutputStream
java.lang.Object
java.io.OutputStream
org.nustaq.serialization.util.FSTOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public final class FSTOutputStream extends OutputStream
Created with IntelliJ IDEA.
User: ruedi
Date: 19.11.12
Time: 10:00
To change this template use File | Settings | File Templates.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FSTOutputStream(int size, OutputStream out)FSTOutputStream(OutputStream out) -
Method Summary
Modifier and Type Method Description voidclose()voidcopyTo(OutputStream out)only works if no flush has been triggered (aka only write one object per stream instance)voidensureCapacity(int minCapacity)voidensureFree(int free)voidflush()byte[]getBuf()intgetOff()OutputStreamgetOutstream()voidreset()voidreset(byte[] out)voidsetBuf(byte[] buf)voidsetOutstream(OutputStream outstream)intsize()byte[]toByteArray()voidwrite(byte[] b, int off, int len)voidwrite(int b)
-
Field Details
-
Constructor Details
-
Method Details
-
getOutstream
-
setOutstream
-
getBuf
public byte[] getBuf() -
setBuf
public void setBuf(byte[] buf) -
ensureFree
- Throws:
IOException
-
ensureCapacity
- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
copyTo
only works if no flush has been triggered (aka only write one object per stream instance)- Parameters:
out-- Throws:
IOException
-
reset
public void reset() -
toByteArray
public byte[] toByteArray() -
size
public int size() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
reset
public void reset(byte[] out) -
getOff
public int getOff()
-