public class TruncatedInputStreamData extends Object
| Constructor and Description |
|---|
TruncatedInputStreamData(InputStream inputStream)
Constructs an instance of a
TruncatedInputStreamData. |
TruncatedInputStreamData(InputStream inputStream,
int kiloByteLimit)
Constructs an instance of a
TruncatedInputStreamData. |
| Modifier and Type | Method and Description |
|---|---|
String |
getCompleteInputStreamSize()
Returns the complete input stream size in human readable format.
|
String |
getInputStreamContent()
Returns the content of the truncated input stream as a string.
|
boolean |
isTruncated()
Returns whether the input stream is actually truncated or not.
|
public TruncatedInputStreamData(InputStream inputStream, int kiloByteLimit) throws IOException
TruncatedInputStreamData.inputStream - input streamkiloByteLimit - limit of the input streamIOException - thrown when error on determining the input stream sizepublic TruncatedInputStreamData(InputStream inputStream) throws IOException
TruncatedInputStreamData. TruncatedInputStreamData instances
created using this constructor will not be truncated.inputStream - input streamIOException - thrown when error on determining the input stream sizepublic boolean isTruncated()
true if the input stream is truncated, false otherwisepublic String getCompleteInputStreamSize()
public String getInputStreamContent()
Copyright © 2019 WSO2. All rights reserved.