Package wt.federation
Class FederatedHttpInputStream
java.lang.Object
java.io.InputStream
wt.federation.FederatedHttpInputStream
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
Supported API: true
Extendable: false
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFederatedHttpInputStream(InputStream inputStream) Constructor returning an instance initialized with the specified input stream. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of bytes that can be read without blocking.voidclose()Closes the stream.booleanReturns true if the last call to readUntilBoundary detected the final boundary of a MIME multipart object.booleanIndicates whether mark and reset methods are supported.intread()Reads and returns the next byte.intread(byte[] b) Reads bytes into the specified buffer.intread(byte[] b, int off, int len) Reads bytes into the specified buffer at the specified position with specified maximum length.byte[]readBytesUntilBoundary(String boundary) Reads octets until a specified MIME boundary is detected.byte[]Reads octets until end of file is detected.intreadBytesUntilFull(byte[] bytes) Reads octets until the specified array is full or end of file is reached.readLine()Reads the next line, returning the line as a String.longskip(long n) Skips and discards the specified number of bytes.Methods inherited from class java.io.InputStream
mark, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Constructor Details
-
FederatedHttpInputStream
Constructor returning an instance initialized with the specified input stream.
Supported API: true- Parameters:
inputStream-
-
-
Method Details
-
available
Returns the number of bytes that can be read without blocking.
Supported API: true- Overrides:
availablein classInputStream- Returns:
- int
- Throws:
IOException
-
close
Closes the stream.
Supported API: true- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
read
Reads and returns the next byte. Returns -1 if end of file reached.
Supported API: true- Specified by:
readin classInputStream- Returns:
- int
- Throws:
IOException
-
read
Reads bytes into the specified buffer. Returns the number of bytes read, or -1 if end of file has been reached.
Supported API: true- Overrides:
readin classInputStream- Parameters:
b-- Returns:
- int
- Throws:
IOException
-
read
Reads bytes into the specified buffer at the specified position with specified maximum length. Returns the number of bytes read, or -1 if end of file reached.
Supported API: true- Overrides:
readin classInputStream- Parameters:
b-off-len-- Returns:
- int
- Throws:
IOException
-
skip
Skips and discards the specified number of bytes.
Supported API: true- Overrides:
skipin classInputStream- Parameters:
n-- Returns:
- long
- Throws:
IOException
-
readLine
Reads the next line, returning the line as a String.
Supported API: true- Returns:
- String
- Throws:
IOException
-
readBytesUntilBoundary
Reads octets until a specified MIME boundary is detected. Returns a byte array containing the bytes read, not including the boundary.
Supported API: true- Parameters:
boundary-- Returns:
- byte []
- Throws:
IOException
-
readBytesUntilEnd
Reads octets until end of file is detected. Returns a byte array containing the bytes read.
Supported API: true- Returns:
- byte []
- Throws:
IOException
-
readBytesUntilFull
Reads octets until the specified array is full or end of file is reached.
Supported API: true- Parameters:
bytes-- Returns:
- int
- Throws:
IOException
-
isFinalBoundary
public boolean isFinalBoundary()Returns true if the last call to readUntilBoundary detected the final boundary of a MIME multipart object.
Supported API: true- Returns:
- boolean
-
markSupported
public boolean markSupported()Indicates whether mark and reset methods are supported. Currently returns false.
Supported API: true- Overrides:
markSupportedin classInputStream- Returns:
- boolean
-