gzz.media
Class MediaOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.ObjectOutputStream
              |
              +--gzz.media.MediaOutputStream
All Implemented Interfaces:
java.io.DataOutput, java.io.ObjectOutput, java.io.ObjectStreamConstants

public class MediaOutputStream
extends java.io.ObjectOutputStream

An ObjectOutputStream that can serialize Spans. Normally, Spans are seen as primitive data containers like e.g. Strings; however, while the interface is supposed to be like this, internally they aren't.

Spans cannot be serialized by normal Java serialization because there would be no context for saving transient spans. Spans can, however, be serialized by using a MediaOutputStream instead of Java's ObjectOutputStream. The MediaOutputStream provides a Mediaserver to the spans which they can save themselves into. By using a MediaOutputStream, you agree that non-saved spans will save themselves.


Field Summary
protected  Mediaserver mediaserver
           
 
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
 
Constructor Summary
MediaOutputStream(java.io.OutputStream out, Mediaserver mediaserver)
           
 
Method Summary
 Mediaserver getMediaserver()
           
 
Methods inherited from class java.io.ObjectOutputStream
annotateClass, annotateProxyClass, close, defaultWriteObject, drain, enableReplaceObject, flush, putFields, replaceObject, reset, useProtocolVersion, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeClassDescriptor, writeDouble, writeFields, writeFloat, writeInt, writeLong, writeObject, writeObjectOverride, writeShort, writeStreamHeader, writeUnshared, writeUTF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mediaserver

protected Mediaserver mediaserver
Constructor Detail

MediaOutputStream

public MediaOutputStream(java.io.OutputStream out,
                         Mediaserver mediaserver)
                  throws java.io.IOException
Method Detail

getMediaserver

public Mediaserver getMediaserver()