Class InputStreamInStream

java.lang.Object
org.locationtech.jts.io.InputStreamInStream
All Implemented Interfaces:
InStream

public class InputStreamInStream extends Object implements InStream
An adapter to allow an InputStream to be used as an InStream
  • Constructor Details

    • InputStreamInStream

      public InputStreamInStream(InputStream is)
  • Method Details

    • read

      public int read(byte[] buf) throws IOException
      Description copied from interface: InStream
      Reads buf.length bytes from the input stream and stores them in the supplied buffer.
      Specified by:
      read in interface InStream
      Parameters:
      buf - the buffer to receive the bytes
      Returns:
      the number of bytes read, or -1 if at end-of-file
      Throws:
      IOException - if an I/O error occurs