Package wt.federation

Class FederatedHttpInputStream

java.lang.Object
java.io.InputStream
wt.federation.FederatedHttpInputStream
All Implemented Interfaces:
Closeable, Serializable, AutoCloseable

public class FederatedHttpInputStream extends InputStream implements Serializable


Supported API: true

Extendable: false
See Also:
  • Constructor Details

    • FederatedHttpInputStream

      public FederatedHttpInputStream(InputStream inputStream)
      Constructor returning an instance initialized with the specified input stream.

      Supported API: true
      Parameters:
      inputStream -
  • Method Details

    • available

      public int available() throws IOException
      Returns the number of bytes that can be read without blocking.

      Supported API: true
      Overrides:
      available in class InputStream
      Returns:
      int
      Throws:
      IOException
    • close

      public void close() throws IOException
      Closes the stream.

      Supported API: true
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class InputStream
      Throws:
      IOException
    • read

      public int read() throws IOException
      Reads and returns the next byte. Returns -1 if end of file reached.

      Supported API: true
      Specified by:
      read in class InputStream
      Returns:
      int
      Throws:
      IOException
    • read

      public int read(byte[] b) throws IOException
      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:
      read in class InputStream
      Parameters:
      b -
      Returns:
      int
      Throws:
      IOException
    • read

      public int read(byte[] b, int off, int len) throws IOException
      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:
      read in class InputStream
      Parameters:
      b -
      off -
      len -
      Returns:
      int
      Throws:
      IOException
    • skip

      public long skip(long n) throws IOException
      Skips and discards the specified number of bytes.

      Supported API: true
      Overrides:
      skip in class InputStream
      Parameters:
      n -
      Returns:
      long
      Throws:
      IOException
    • readLine

      public String readLine() throws IOException
      Reads the next line, returning the line as a String.

      Supported API: true
      Returns:
      String
      Throws:
      IOException
    • readBytesUntilBoundary

      public byte[] readBytesUntilBoundary(String boundary) throws IOException
      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

      public byte[] readBytesUntilEnd() throws IOException
      Reads octets until end of file is detected. Returns a byte array containing the bytes read.

      Supported API: true
      Returns:
      byte []
      Throws:
      IOException
    • readBytesUntilFull

      public int readBytesUntilFull(byte[] bytes) throws IOException
      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:
      markSupported in class InputStream
      Returns:
      boolean