com.a2zss.ISO8583
Class InputStreamBuffer
java.lang.Object
java.io.InputStream
com.a2zss.ISO8583.InputStreamBuffer
- All Implemented Interfaces:
- java.io.Closeable
public class InputStreamBuffer
- extends java.io.InputStream
This class can be used for simulating InputStream for already buffered data
that can then parsed by parser as stream data
Method Summary |
byte[] |
getData()
|
int |
read()
|
void |
setData(byte[] d)
to update the Stream with buffer of new data to be read |
Methods inherited from class java.io.InputStream |
available, close, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InputStreamBuffer
public InputStreamBuffer()
- constructs an empty InputStream
InputStreamBuffer
public InputStreamBuffer(byte[] d)
- constructs an with specified data
- Parameters:
d
- the data to consume
read
public int read()
- Specified by:
read
in class java.io.InputStream
- Returns:
- a byte of data (0..255) form this stream or -1 if end of stream reached
getData
public byte[] getData()
- Returns:
- the data buffer that was supplied to be read
setData
public void setData(byte[] d)
- to update the Stream with buffer of new data to be read
Copyright © 2002-2010 AZS Services Ltd. All Rights Reserved.