public class ByteArrayInputStreamProvider extends Object implements IHasInputStreamAndReader, Serializable
InputStream provider based on a byte array.| Constructor and Description |
|---|
ByteArrayInputStreamProvider(byte[] aData) |
ByteArrayInputStreamProvider(byte[] aData,
int nOfs,
int nLen) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData() |
InputStream |
getInputStream()
Get the input stream to read from the object.
|
int |
getLength() |
int |
getOffset() |
boolean |
isReadMultiple()
Check if the
InputStream from IHasInputStream.getInputStream() can be
acquired more than once. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetReaderpublic ByteArrayInputStreamProvider(@Nonnull byte[] aData)
public ByteArrayInputStreamProvider(@Nonnull byte[] aData, @Nonnegative int nOfs, @Nonnegative int nLen)
@Nonnull @ReturnsMutableCopy public final byte[] getData()
@Nonnegative public final int getOffset()
@Nonnegative public final int getLength()
@Nonnull public final InputStream getInputStream()
IHasInputStreamInputStream needs to be created!getInputStream in interface IHasInputStreamnull if resolving failed.public final boolean isReadMultiple()
IHasInputStreamInputStream from IHasInputStream.getInputStream() can be
acquired more than once.isReadMultiple in interface IHasInputStreamtrue if the input stream can be acquired more than
once, false if not.Copyright © 2014–2017 Philip Helger. All rights reserved.