Package org.locationtech.jts.io
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 anInputStreamto be used as anInStream
-
-
Constructor Summary
Constructors Constructor Description InputStreamInStream(InputStream is)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intread(byte[] buf)Readsbuf.lengthbytes from the input stream and stores them in the supplied buffer.
-
-
-
Constructor Detail
-
InputStreamInStream
public InputStreamInStream(InputStream is)
-
-
Method Detail
-
read
public int read(byte[] buf) throws IOExceptionDescription copied from interface:InStreamReadsbuf.lengthbytes from the input stream and stores them in the supplied buffer.- Specified by:
readin interfaceInStream- 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
-
-