Package com.github.javaparser
Class StringProvider
- java.lang.Object
-
- com.github.javaparser.StringProvider
-
- All Implemented Interfaces:
Provider
,Closeable
,AutoCloseable
public class StringProvider extends Object implements Provider
-
-
Constructor Summary
Constructors Constructor Description StringProvider(String sStr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
read(char[] aDest, int nOfs, int nLen)
Reads characters into an array
-
-
-
Constructor Detail
-
StringProvider
public StringProvider(String sStr)
-
-
Method Detail
-
read
public int read(char[] aDest, int nOfs, int nLen) throws IOException
Description copied from interface:Provider
Reads characters into an array- Specified by:
read
in interfaceProvider
- Parameters:
aDest
- Destination buffer. May not benull
.nOfs
- Offset at which to start storing characters. Must be ≥ 0.nLen
- The maximum possible number of characters to read. Must be ≥ 0.- Returns:
- The number of characters read, or -1 at the end of the stream
- Throws:
IOException
- if reading fails
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-