public class JavaBinCodec extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
JavaBinCodec.ObjectResolver |
Modifier and Type | Field and Description |
---|---|
static byte |
ARR |
static byte |
BOOL_FALSE |
static byte |
BOOL_TRUE |
static byte |
BYTE |
static byte |
BYTEARR |
protected FastOutputStream |
daos |
static byte |
DATE |
static byte |
DOUBLE |
static byte |
END |
protected static Object |
END_OBJ |
static byte |
EXTERN_STRING |
static byte |
FLOAT |
static byte |
INT |
static byte |
ITERATOR |
static byte |
LONG |
static byte |
MAP |
static byte |
NAMED_LST |
static byte |
NULL |
static byte |
ORDERED_MAP |
static byte |
SHORT |
static byte |
SINT |
static byte |
SLONG |
static byte |
SOLRDOC |
static byte |
SOLRDOCLST |
static byte |
SOLRINPUTDOC |
static byte |
STR |
static byte |
TAG_AND_LEN |
protected byte |
tagByte |
Constructor and Description |
---|
JavaBinCodec() |
JavaBinCodec(JavaBinCodec.ObjectResolver resolver) |
public static final byte NULL
public static final byte BOOL_TRUE
public static final byte BOOL_FALSE
public static final byte BYTE
public static final byte SHORT
public static final byte DOUBLE
public static final byte INT
public static final byte LONG
public static final byte FLOAT
public static final byte DATE
public static final byte MAP
public static final byte SOLRDOC
public static final byte SOLRDOCLST
public static final byte BYTEARR
public static final byte ITERATOR
public static final byte END
public static final byte SOLRINPUTDOC
public static final byte TAG_AND_LEN
public static final byte STR
public static final byte SINT
public static final byte SLONG
public static final byte ARR
public static final byte ORDERED_MAP
public static final byte NAMED_LST
public static final byte EXTERN_STRING
protected FastOutputStream daos
protected static final Object END_OBJ
protected byte tagByte
public JavaBinCodec()
public JavaBinCodec(JavaBinCodec.ObjectResolver resolver)
public void marshal(Object nl, OutputStream os) throws IOException
IOException
public void init(FastOutputStream os)
public Object unmarshal(InputStream is) throws IOException
IOException
public SimpleOrderedMap<Object> readOrderedMap(FastInputStream dis) throws IOException
IOException
public NamedList<Object> readNamedList(FastInputStream dis) throws IOException
IOException
public void writeNamedList(NamedList<?> nl) throws IOException
IOException
public void writeVal(Object val) throws IOException
IOException
public Object readVal(FastInputStream dis) throws IOException
IOException
public boolean writeKnownType(Object val) throws IOException
IOException
public void writeTag(byte tag) throws IOException
IOException
public void writeTag(byte tag, int size) throws IOException
IOException
public void writeByteArray(byte[] arr, int offset, int len) throws IOException
IOException
public byte[] readByteArray(FastInputStream dis) throws IOException
IOException
public void writeSolrDocument(SolrDocument doc) throws IOException
IOException
public SolrDocument readSolrDocument(FastInputStream dis) throws IOException
IOException
public SolrDocumentList readSolrDocumentList(FastInputStream dis) throws IOException
IOException
public void writeSolrDocumentList(SolrDocumentList docs) throws IOException
IOException
public SolrInputDocument readSolrInputDocument(FastInputStream dis) throws IOException
IOException
public void writeSolrInputDocument(SolrInputDocument sdoc) throws IOException
IOException
public Map<Object,Object> readMap(FastInputStream dis) throws IOException
IOException
public void writeIterator(Iterator iter) throws IOException
IOException
public List<Object> readIterator(FastInputStream fis) throws IOException
IOException
public void writeArray(List l) throws IOException
IOException
public void writeArray(Collection coll) throws IOException
IOException
public void writeArray(Object[] arr) throws IOException
IOException
public List<Object> readArray(FastInputStream dis) throws IOException
IOException
public void writeStr(String s) throws IOException
IOException
public String readStr(FastInputStream dis) throws IOException
IOException
public void writeInt(int val) throws IOException
IOException
public int readSmallInt(FastInputStream dis) throws IOException
IOException
public void writeLong(long val) throws IOException
IOException
public long readSmallLong(FastInputStream dis) throws IOException
IOException
public void writeFloat(float val) throws IOException
IOException
public boolean writePrimitive(Object val) throws IOException
IOException
public void writeMap(Map<?,?> val) throws IOException
IOException
public int readSize(FastInputStream in) throws IOException
IOException
public static void writeVInt(int i, FastOutputStream out) throws IOException
IOException
- If there is a low-level I/O error.public static int readVInt(FastInputStream in) throws IOException
writeVInt(int, FastOutputStream)
IOException
- If there is a low-level I/O error.public static void writeVLong(long i, FastOutputStream out) throws IOException
IOException
public static long readVLong(FastInputStream in) throws IOException
IOException
public void writeExternString(String s) throws IOException
IOException
public String readExternString(FastInputStream fis) throws IOException
IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.