Package com.github.javaparser
Class StreamProvider
- java.lang.Object
-
- com.github.javaparser.StreamProvider
-
-
Constructor Summary
Constructors Constructor Description StreamProvider(InputStream stream)
StreamProvider(InputStream stream, String charsetName)
StreamProvider(Reader reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the stream and releases any system resources associated with it.int
read(char[] buffer, int off, int len)
Reads characters into an array
-
-
-
Constructor Detail
-
StreamProvider
public StreamProvider(Reader reader)
-
StreamProvider
public StreamProvider(InputStream stream) throws IOException
- Throws:
IOException
-
StreamProvider
public StreamProvider(InputStream stream, String charsetName) throws IOException
- Throws:
IOException
-
-
Method Detail
-
read
public int read(char[] buffer, int off, int len) throws IOException
Description copied from interface:Provider
Reads characters into an array- Specified by:
read
in interfaceProvider
- Parameters:
buffer
- Destination bufferoff
- Offset at which to start storing characters- Returns:
- The number of characters read, or -1 if all read
- Throws:
IOException
-
close
public void close() throws IOException
Description copied from interface:Provider
Closes the stream and releases any system resources associated with it.- Specified by:
close
in interfaceProvider
- Throws:
IOException
-
-