Package org.nustaq.serialization.minbin
Class MBOut
java.lang.Object
org.nustaq.serialization.minbin.MBOut
Date: 12.04.2014
Time: 22:11
To change this template use File | Settings | File Templates.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytez()intvoidreset()completely reset statevoidreset(byte[] bytez) completely reset and use given bytearray as buffervoidonly reset positionvoidwriteArray(Object primitiveArray, int start, int len) write primitive array + header. no floating point or object array allowed.voidwriteInt(byte type, long data) write an int type with headervoidwriteIntPacked(long data) encode int using only as much bytes as needed to represent itvoidvoidwriteRaw(byte[] bufferedName, int i, int length) allow write through to underlying byte for performance reasonsprotected voidwriteRawInt(byte type, long data) encode int without header tagvoidvoidwriteTagHeader(byte tagId)
-
Constructor Details
-
MBOut
public MBOut() -
MBOut
-
-
Method Details
-
writeInt
public void writeInt(byte type, long data) write an int type with header- Parameters:
type-data-
-
writeRawInt
protected void writeRawInt(byte type, long data) encode int without header tag- Parameters:
data-
-
writeIntPacked
public void writeIntPacked(long data) encode int using only as much bytes as needed to represent it- Parameters:
data-
-
writeArray
write primitive array + header. no floating point or object array allowed. Just int based types- Parameters:
primitiveArray-start-len-
-
writeTagHeader
public void writeTagHeader(byte tagId) -
writeTag
-
getWritten
public int getWritten() -
getBytez
public byte[] getBytez() -
reset
public void reset()completely reset state -
reset
public void reset(byte[] bytez) completely reset and use given bytearray as buffer- Parameters:
bytez-
-
resetPosition
public void resetPosition()only reset position -
writeObject
-
writeRaw
public void writeRaw(byte[] bufferedName, int i, int length) allow write through to underlying byte for performance reasons- Parameters:
bufferedName-i-length-
-