AZS

com.a2zss.ISO8583
Class InputStreamBuffer

java.lang.Object
  extended by java.io.InputStream
      extended by 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


Constructor Summary
InputStreamBuffer()
          constructs an empty InputStream
InputStreamBuffer(byte[] d)
          constructs an with specified 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
 

Constructor Detail

InputStreamBuffer

public InputStreamBuffer()
constructs an empty InputStream


InputStreamBuffer

public InputStreamBuffer(byte[] d)
constructs an with specified data

Parameters:
d - the data to consume
Method Detail

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


AZS

Copyright © 2002-2010 AZS Services Ltd. All Rights Reserved.