com.sap.portal.httpconnectivity.transformationservice.xmlsource
Class XMLSourceBufferedInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--java.io.BufferedInputStream
|
+--com.sap.portal.httpconnectivity.transformationservice.xmlsource.XMLSourceBufferedInputStream
- public class XMLSourceBufferedInputStream
- extends java.io.BufferedInputStream
Class that used to buffer the data of the stream source so it could be
cached later.
The data is stored when the input stream read methods are called.
Note: Used internaly.
- Version:
- Since EP 6.0 SP7
|
Field Summary |
protected com.sap.engine.lib.util.ArrayByte |
m_arrayByte
Buffer holding the data |
| Fields inherited from class java.io.BufferedInputStream |
buf, count, marklimit, markpos, pos |
| Fields inherited from class java.io.FilterInputStream |
in |
|
Method Summary |
protected com.sap.engine.lib.util.ArrayByte |
getByteBuffer()
Gets the data stored from the input stream. |
int |
read()
Read one byte from the input stream and stores it in the buffer. |
int |
read(byte[] readBuf)
Reads some number of bytes from the input stream and then stores them into
the returned buffer array readBuf and in the cache buffer array m_arrayByte.
|
int |
read(byte[] readBuf,
int off,
int len)
Reads up to len bytes of data from the input stream into
the readBufarray of bytes and stores the bytes in the m_arrayByte buffer.
|
| Methods inherited from class java.io.BufferedInputStream |
available, close, mark, markSupported, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_arrayByte
protected com.sap.engine.lib.util.ArrayByte m_arrayByte
- Buffer holding the data
XMLSourceBufferedInputStream
public XMLSourceBufferedInputStream(java.io.InputStream is)
- Creates a new XMLSourceBufferedInputStream object.
- Parameters:
is - the buffered stream
getByteBuffer
protected com.sap.engine.lib.util.ArrayByte getByteBuffer()
- Gets the data stored from the input stream.
- Returns:
- the data stored from the input stream
read
public int read()
throws java.io.IOException
- Read one byte from the input stream and stores it in the buffer.
- Overrides:
read in class java.io.BufferedInputStream
- Returns:
- the next byte of data, or
-1 if the end of the
stream is reached. - Throws:
java.io.IOException - when an I/O error occurs.
read
public int read(byte[] readBuf)
throws java.io.IOException
- Reads some number of bytes from the input stream and then stores them into
the returned buffer array
readBuf and in the cache buffer array m_arrayByte.
The number of bytes actually read is
returned as an integer. This method blocks until input data is
available, end of file is detected, or an exception is thrown.
- Overrides:
read in class java.io.FilterInputStream
- Parameters:
readBuf - buffer of bytes that will be filled with data from the input field.- Returns:
- number of bytes read from the input stream
- Throws:
java.io.IOException - when cannot read from the input stream
read
public int read(byte[] readBuf,
int off,
int len)
throws java.io.IOException
- Reads up to
len bytes of data from the input stream into
the readBufarray of bytes and stores the bytes in the m_arrayByte buffer.
An attempt is made to read as many as
len bytes, but a smaller number may be read, possibly
zero. The number of bytes actually read is returned as an integer.
- Overrides:
read in class java.io.BufferedInputStream
- Parameters:
readBuf - the buffer into which the data is readoff - the start offset in array readBuf
at which the data is writtenlen - the maximum number of bytes to read- Returns:
- the total number of bytes read into the buffer, or
-1 if there is no more data because the end of
the stream has been reached. - Throws:
java.io.IOException - when cannot read from the input stream