net.netheos.pcsapi.bytesio
Class MemoryByteSource
java.lang.Object
net.netheos.pcsapi.bytesio.MemoryByteSource
- All Implemented Interfaces:
- ByteSource
public class MemoryByteSource
- extends Object
- implements ByteSource
Implementation of an in-memory ByteSource
|
Method Summary |
long |
length()
Return length of stream (must be known before consuming stream) |
InputStream |
openStream()
Returns a ByteSourceStream object for reading data, to be closed by caller |
String |
toString()
|
MemoryByteSource
public MemoryByteSource(byte[] data)
openStream
public InputStream openStream()
- Description copied from interface:
ByteSource
- Returns a ByteSourceStream object for reading data, to be closed by caller
- Specified by:
openStream in interface ByteSource
- Returns:
- the underlying stream
length
public long length()
- Description copied from interface:
ByteSource
- Return length of stream (must be known before consuming stream)
- Specified by:
length in interface ByteSource
- Returns:
- The stream bytes count
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2014. All Rights Reserved.