net.groboclown.util.xml.v1
Class XmlObjectOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--java.io.ObjectOutputStream
|
+--net.groboclown.util.xml.v1.XmlObjectOutputStream
- All Implemented Interfaces:
- DataOutput, ObjectOutput, ObjectStreamConstants
- public class XmlObjectOutputStream
- extends ObjectOutputStream
A variation on the ObjectOutputStream
such that it
outputs to XML instead of a proprietary binary format.
This is accomplished by overriding all the DataOutput
elements.
- Version:
- 0.9.0 Alpha
- Author:
- Matt Albrecht
Fields inherited from class java.io.ObjectOutputStream |
abortIOException, blockDataMode, buf, cdata, CDATA_MAX_LEN, classDescStack, count, currentClassDesc, currentObject, currentPutFields, data, dos, enableReplace, enableSubclassImplementation, handleTable, INITIAL_BUFFER_SIZE, NOT_REPLACEABLE, out, recursionDepth, REPLACEABLE, replaceTable, useDeprecatedExternalizableFormat, writeObjectArglist |
Fields inherited from interface java.io.ObjectStreamConstants |
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING |
Methods inherited from class java.io.ObjectOutputStream |
addReplacement, annotateClass, annotateProxyClass, bufferedWrite, checkSpecialClasses, checkSubstitutableSpecialClasses, defaultWriteObject, doublesToBytes, drain, enableReplaceObject, floatsToBytes, flush, getObjectFieldValue, getPrimitiveFieldValues, getUTFLength, invokeObjectWriter, lookupReplace, outputArray, outputClass, outputClassDescriptor, outputClassFields, outputObject, outputString, putFields, replaceObject, reset, resetStream, serializeNullAndRepeat, setBlockData, useProtocolVersion, write, writeBlockDataHeader, writeCanonical, writeClassDescriptor, writeClassDescriptor0, writeCode, writeFields, writeInternal, writeObject, writeObjectOverride, writeStreamHeader, writeTypeString, writeUTFBody |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
STREAM_HEADER
private static final byte[] STREAM_HEADER
STREAM_FOOTER
private static final byte[] STREAM_FOOTER
START_HEADER
private static final byte[] START_HEADER
START_FOOTER
private static final byte[] START_FOOTER
haveWrittenHeader
boolean haveWrittenHeader
hasStartedStream
boolean hasStartedStream
hasWrittenStartHeader
boolean hasWrittenStartHeader
XmlObjectOutputStream
public XmlObjectOutputStream(OutputStream out)
throws IOException
close
public void close()
throws IOException
- Overrides:
close
in class ObjectOutputStream
_write
protected void _write(String s)
throws IOException
write
public void write(byte[] buff,
int offset,
int len)
throws IOException
- Overrides:
write
in class ObjectOutputStream
write
public void write(int val)
throws IOException
- Overrides:
write
in class ObjectOutputStream
writeBoolean
public void writeBoolean(boolean v)
throws IOException
- Overrides:
writeBoolean
in class ObjectOutputStream
writeByte
public void writeByte(int v)
throws IOException
- Overrides:
writeByte
in class ObjectOutputStream
writeBytes
public void writeBytes(String s)
throws IOException
- Overrides:
writeBytes
in class ObjectOutputStream
writeChar
public void writeChar(int v)
throws IOException
- Overrides:
writeChar
in class ObjectOutputStream
writeChars
public void writeChars(String s)
throws IOException
- Overrides:
writeChars
in class ObjectOutputStream
writeDouble
public void writeDouble(double v)
throws IOException
- Overrides:
writeDouble
in class ObjectOutputStream
writeFloat
public void writeFloat(float v)
throws IOException
- Overrides:
writeFloat
in class ObjectOutputStream
writeInt
public void writeInt(int v)
throws IOException
- Overrides:
writeInt
in class ObjectOutputStream
writeLong
public void writeLong(long v)
throws IOException
- Overrides:
writeLong
in class ObjectOutputStream
writeShort
public void writeShort(int v)
throws IOException
- Overrides:
writeShort
in class ObjectOutputStream
writeUTF
public void writeUTF(String str)
throws IOException
- Overrides:
writeUTF
in class ObjectOutputStream
writeHeader
protected void writeHeader()
throws IOException
Written under the LGPL