gzz.media
Class MediaInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.ObjectInputStream
              |
              +--gzz.media.MediaInputStream
All Implemented Interfaces:
java.io.DataInput, java.io.ObjectInput, java.io.ObjectStreamConstants

public class MediaInputStream
extends java.io.ObjectInputStream

An ObjectInputStream 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 deserialized by normal Java serialization because there would be no context for loading scroll blocks. Spans can, however, be deserialized by using a MediaInputStream instead of Java's ObjectInputStream. The MediaInputStream provides a Mediaserver to the spans which they can load their scrollblocks from. By using a MediaOutputStream, you agree that spans may load their blocks.


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
MediaInputStream(java.io.InputStream in, Mediaserver mediaserver)
           
 
Method Summary
 Mediaserver getMediaserver()
           
 
Methods inherited from class java.io.ObjectInputStream
available, close, defaultReadObject, enableResolveObject, read, read, readBoolean, readByte, readChar, readClassDescriptor, readDouble, readFields, readFloat, readFully, readFully, readInt, readLine, readLong, readObject, readObjectOverride, readShort, readStreamHeader, readUnshared, readUnsignedByte, readUnsignedShort, readUTF, registerValidation, resolveClass, resolveObject, resolveProxyClass, skipBytes
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.ObjectInput
read, skip
 

Field Detail

mediaserver

protected Mediaserver mediaserver
Constructor Detail

MediaInputStream

public MediaInputStream(java.io.InputStream in,
                        Mediaserver mediaserver)
                 throws java.io.IOException
Method Detail

getMediaserver

public Mediaserver getMediaserver()