public class InputAdapter extends Object
Utility methods to get data out of different sources, this is used in the lexer internally. These methods are package private. Some of this is shamelessly lifted from http://www.java2s.com/Code/Java/File-Input-Output/ReadInputStreamtostring.htm
| Modifier and Type | Field and Description |
|---|---|
private static int |
DEFAULT_BUFFER_SIZE |
private Lock |
lock |
| Constructor and Description |
|---|
InputAdapter() |
| Modifier and Type | Method and Description |
|---|---|
(package private) String |
asString(File file) |
(package private) String |
asString(File file,
Charset charset) |
(package private) String |
asString(InputStream pStream) |
(package private) String |
asString(Reader reader) |
private long |
copy(InputStream pInputStream,
OutputStream pOutputStream,
boolean pClose) |
private long |
copy(InputStream pIn,
OutputStream pOut,
boolean pClose,
byte[] pBuffer) |
private static final int DEFAULT_BUFFER_SIZE
private final Lock lock
String asString(InputStream pStream)
private long copy(InputStream pInputStream, OutputStream pOutputStream, boolean pClose) throws IOException
IOExceptionprivate long copy(InputStream pIn, OutputStream pOut, boolean pClose, byte[] pBuffer) throws IOException
IOExceptionCopyright © 2011-2014 David R. Smith. All Rights Reserved.