Package org.duracloud.chunk.stream
Class KnownLengthInputStream
java.lang.Object
java.io.InputStream
java.io.ByteArrayInputStream
org.duracloud.chunk.stream.KnownLengthInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
This wraps ByteArrayInputStream and adds a length field.
- Author:
- Andrew Woods Date: Feb 10, 2010
-
Field Summary
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.ByteArrayInputStream
available, close, mark, markSupported, read, read, readAllBytes, readNBytes, reset, skip, transferToMethods inherited from class java.io.InputStream
nullInputStream, read, readNBytes, skipNBytes
-
Constructor Details
-
KnownLengthInputStream
- Throws:
UnsupportedEncodingException
-
KnownLengthInputStream
public KnownLengthInputStream(byte[] bytes)
-
-
Method Details
-
getLength
public int getLength()
-