org.miv.mbox.net
Class PositionableByteArrayInputStream
java.lang.Object
java.io.InputStream
java.io.ByteArrayInputStream
org.miv.mbox.net.PositionableByteArrayInputStream
- All Implemented Interfaces:
- Closeable
public class PositionableByteArrayInputStream
- extends ByteArrayInputStream
Descendant of ByteArrayInputStream that allows to change the offset and
length.
The standard ByteArrayInputStream can only wrap a fixed part of its
underlying byte array (this byte array being managed by another source). As
the ByteArrayInputStream is used as source for other streams, it is not
possible to create a new ByteArrayInputStream if the part of the underlying
byte array used to read changes. Therefore this class allows to change the
offset and length of the part to use. Furthermore, it also allows to change
the underlying byte array.
- Since:
- 20041103
- Author:
- Antoine Dutot
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PositionableByteArrayInputStream
public PositionableByteArrayInputStream(byte[] buf)
PositionableByteArrayInputStream
public PositionableByteArrayInputStream(byte[] buf,
int offset,
int length)
getPos
public int getPos()
setPos
public void setPos(int pos,
int count)
changeBuffer
public void changeBuffer(byte[] buf)
Copyright © 2011. All Rights Reserved.