Package net.sf.okapi.filters.json.parser
Class StreamProvider
- java.lang.Object
-
- net.sf.okapi.filters.json.parser.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 voidclose()Closes the stream and releases any system resources associated with it.intread(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 IOExceptionDescription copied from interface:ProviderReads characters into an array- Specified by:
readin interfaceProvider- Parameters:
buffer- Destination bufferoff- Offset at which to start storing characterslen- The maximum possible number of characters to read- Returns:
- The number of characters read, or -1 if all read
- Throws:
IOException
-
close
public void close() throws IOExceptionDescription copied from interface:ProviderCloses the stream and releases any system resources associated with it.- Specified by:
closein interfaceProvider- Throws:
IOException
-
-