public abstract class AbstractWireAdapter extends Object implements WireAdapter
WireAdapter.WireAdapterHelper| Modifier and Type | Field and Description |
|---|---|
protected String |
key |
protected ObjectInputStream |
ois |
protected static int |
READ_LIMIT |
HELPER| Constructor and Description |
|---|
AbstractWireAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
flush() |
protected abstract Entry |
nextEntry() |
protected abstract String |
nextKey() |
void |
prepareToReadFrom(InputStream is) |
void |
prepareToWriteTo(OutputStream out) |
protected abstract void |
read(boolean mandatory,
ObjectInputStream ois,
Catalog catalog) |
Entry |
readEntry() |
protected abstract void |
readHeader(ObjectInputStream ois,
Catalog catalog) |
String |
readKey() |
protected abstract void |
write(ObjectOutputStream objectOutputStream,
Catalog catalog) |
protected abstract void |
write(ObjectOutputStream oos,
String key,
Object value,
Entry.ContextType contextType,
EnumSet<PropagationMode> propagationModes,
String className) |
<T> void |
write(String key,
Entry entry) |
protected abstract void |
writeFooter(ObjectOutputStream objectOutputStream) |
protected abstract void |
writeHeader(ObjectOutputStream os) |
protected static final int READ_LIMIT
protected String key
protected ObjectInputStream ois
public final void prepareToWriteTo(OutputStream out) throws IOException
prepareToWriteTo in interface WireAdapterIOExceptionprotected abstract void writeHeader(ObjectOutputStream os) throws IOException
IOExceptionpublic final <T> void write(String key, Entry entry) throws IOException
write in interface WireAdapterIOExceptionprotected abstract void write(ObjectOutputStream oos, String key, Object value, Entry.ContextType contextType, EnumSet<PropagationMode> propagationModes, String className) throws IOException
IOExceptionpublic final void prepareToReadFrom(InputStream is) throws IOException
prepareToReadFrom in interface WireAdapterIOExceptionprotected abstract void readHeader(ObjectInputStream ois, Catalog catalog) throws IOException
IOExceptionpublic final void flush()
throws IOException
flush in interface WireAdapterIOExceptionprotected abstract void write(ObjectOutputStream objectOutputStream, Catalog catalog) throws IOException
IOExceptionprotected abstract void writeFooter(ObjectOutputStream objectOutputStream) throws IOException
IOExceptionpublic final String readKey() throws IOException
readKey in interface WireAdapterIOExceptionprotected abstract void read(boolean mandatory,
ObjectInputStream ois,
Catalog catalog)
throws IOException
IOExceptionprotected abstract String nextKey() throws IOException
IOExceptionpublic final Entry readEntry() throws IOException, ClassNotFoundException
readEntry in interface WireAdapterIOExceptionClassNotFoundExceptionprotected abstract Entry nextEntry() throws ClassNotFoundException, IOException
ClassNotFoundExceptionIOExceptionCopyright © 2017. All rights reserved.