org.mobicents.media.server.impl.resource.mediaplayer.mpeg
Class Box

java.lang.Object
  extended by org.mobicents.media.server.impl.resource.mediaplayer.mpeg.Box
Direct Known Subclasses:
AmrSpecificBox, CleanApertureBox, DataInformationBox, EditBox, FileTypeBox, FreeSpaceBox, FullBox, MediaBox, MediaDataBox, MediaInformationBox, MovieBox, MovieHintInformation, PixelAspectRatioBox, RTPMovieHintInformation, RTPTrackSdpHintInformation, SampleEntry, SampleTableBox, SequenceOffSet, TimeOffSet, TimeScaleEntry, TrackBox, TrackHintInformation, TrackReferenceBox, TrackReferenceTypeBox, UndefinedBox, UserDataBox

public abstract class Box
extends java.lang.Object

Author:
kulikov

Field Summary
static java.util.HashMap<byte[],java.lang.String> bytetoTypeMap
           
 
Constructor Summary
Box(long size, java.lang.String type)
           
 
Method Summary
protected  boolean comparebytes(byte[] arg1, byte[] arg2)
           
 long getSize()
           
 java.lang.String getType()
           
protected abstract  int load(java.io.DataInputStream fin)
          Loads Box from stream.
protected  byte[] read(java.io.DataInputStream in)
           
protected  int read16(java.io.DataInputStream fin)
           
protected  int read24(java.io.DataInputStream fin)
           
protected  int read32(java.io.DataInputStream in)
           
protected  double readFixedPoint1616(java.io.DataInputStream fin)
           
protected  java.lang.String readText(java.io.DataInputStream in)
           
protected  java.lang.String readType(java.io.DataInputStream in)
           
protected  long readU32(java.io.DataInputStream in)
           
protected  long readU64(java.io.DataInputStream fin)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bytetoTypeMap

public static java.util.HashMap<byte[],java.lang.String> bytetoTypeMap
Constructor Detail

Box

public Box(long size,
           java.lang.String type)
Method Detail

getSize

public long getSize()

getType

public java.lang.String getType()

readType

protected java.lang.String readType(java.io.DataInputStream in)
                             throws java.io.IOException
Throws:
java.io.IOException

readText

protected java.lang.String readText(java.io.DataInputStream in)
                             throws java.io.IOException
Throws:
java.io.IOException

read

protected byte[] read(java.io.DataInputStream in)
               throws java.io.IOException
Throws:
java.io.IOException

read32

protected int read32(java.io.DataInputStream in)
              throws java.io.IOException
Throws:
java.io.IOException

readU32

protected long readU32(java.io.DataInputStream in)
                throws java.io.IOException
Throws:
java.io.IOException

readU64

protected long readU64(java.io.DataInputStream fin)
                throws java.io.IOException
Throws:
java.io.IOException

read24

protected int read24(java.io.DataInputStream fin)
              throws java.io.IOException
Throws:
java.io.IOException

read16

protected int read16(java.io.DataInputStream fin)
              throws java.io.IOException
Throws:
java.io.IOException

readFixedPoint1616

protected double readFixedPoint1616(java.io.DataInputStream fin)
                             throws java.io.IOException
Throws:
java.io.IOException

comparebytes

protected boolean comparebytes(byte[] arg1,
                               byte[] arg2)

load

protected abstract int load(java.io.DataInputStream fin)
                     throws java.io.IOException
Loads Box from stream.

Parameters:
fin - the stream to load box from
Returns:
the number of bytes readed from stream; *
Throws:
java.io.IOException - if some I/O error occured.


Copyright © 2010. All Rights Reserved.