TV-Browser 2.7.5 API

webplugin.aclib.codec
Class StreamDecoder

java.lang.Object
  extended by webplugin.aclib.codec.AbstractDecoder
      extended by webplugin.aclib.codec.StreamDecoder

public class StreamDecoder
extends AbstractDecoder

File decoder based on InputStream (Chris' implementation).

Author:
© Christian Treber, ct@ctreber.com

Field Summary
 
Fields inherited from class webplugin.aclib.codec.AbstractDecoder
_pos, BIG_ENDIAN, LITTLE_ENDIAN
 
Constructor Summary
StreamDecoder(InputStream pStream)
          Create a BIG_ENDIAN file decoder.
 
Method Summary
 void close()
          Call when done with decoder.
 byte[] readBytes(long pBytes, byte[] pBuffer)
          Implemented by a specific decoder.
 void seek(long pBytes)
           
 
Methods inherited from class webplugin.aclib.codec.AbstractDecoder
getPos, readUInt1, readUInt2, readUInt4, readValue, setEndianess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamDecoder

public StreamDecoder(InputStream pStream)
Create a BIG_ENDIAN file decoder. See AbstractDecoder.setEndianess(int)to change the default behavior.

Parameters:
pStream -
Method Detail

seek

public void seek(long pBytes)
          throws IOException
Specified by:
seek in class AbstractDecoder
Parameters:
pBytes - Position to advance to. Nothing will happen if the position has already been passed.
Throws:
IOException

readBytes

public byte[] readBytes(long pBytes,
                        byte[] pBuffer)
                 throws IOException
Description copied from class: AbstractDecoder
Implemented by a specific decoder.

Specified by:
readBytes in class AbstractDecoder
Parameters:
pBytes - Bytes to read
pBuffer - The buffer to write the read bytes to. If null, a buffer is reserved.
Returns:
Array with the bytes read.
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: AbstractDecoder
Call when done with decoder.

Specified by:
close in class AbstractDecoder
Throws:
IOException
See Also:
com.ctreber.aclib.codec.AbstractDecoder#close()

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)