webplugin.aclib.codec
Class StreamDecoder
java.lang.Object
webplugin.aclib.codec.AbstractDecoder
webplugin.aclib.codec.StreamDecoder
public class StreamDecoder
- extends AbstractDecoder
File decoder based on InputStream (Chris' implementation).
- Author:
- © Christian Treber, ct@ctreber.com
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamDecoder
public StreamDecoder(InputStream pStream)
- Create a BIG_ENDIAN file decoder. See
AbstractDecoder.setEndianess(int)to change the default behavior.
- Parameters:
pStream -
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 readpBuffer - 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, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)