| java.lang.Object net.sourceforge.groboutils.util.io.v1.ReadStringStream
ReadStringStream | public class ReadStringStream (Code) | | Reads a byte array from a stream until the stream is finished.
You can specify a maximum size to read, and the block read size.
author: Matt Albrecht groboclown@users.sourceforge.net since: Alpha 0.9.1d (sometime in 2001) version: $Date: 2003/02/10 22:52:45 $ |
DEFAULT_BLOCK_READ_SIZE | final public static int DEFAULT_BLOCK_READ_SIZE(Code) | | Default block read size.
|
READ_TO_END_OF_STREAM | final public static int READ_TO_END_OF_STREAM(Code) | | Read in an unlimited number of bytes. This can be very
dangerous.
|
ReadStringStream | public ReadStringStream(Reader input)(Code) | | Create a new stream using the default parameters and the given
reader.
Parameters: input - reader to pull from. |
ReadStringStream | public ReadStringStream(Reader input, int maxReadSize, int blockReadSize)(Code) | | Parameters: input - reader to pull from. |
readStringStream | public String readStringStream() throws IOException(Code) | | Read in the byte stream, using the current settings.
the read-in string |
readStringStream | public static String readStringStream(Reader input, int maxReadSize, int blockReadSize) throws IOException(Code) | | Read in the stream to a String. Does not close the stream after it has
finished reading.
Note that there is no variable checking, for performance reasons.
The user needs to verify that:
Parameters: input - the reader, which cannot be null. Parameters: maxReadSize - the maximum number of bytes to read, whichmust be positive, and must be modulo 0 of blockReadSize.This is an "estimation", and may actually read in more than thismany bytes if it is not modulo 0 of blockReadSize, butwill always return all the bytes read. Parameters: blockReadSize - the number of bytes to read in per read command,which cannot be more than maxReadSize, and cannot beless than or equal to zero. |
setReader | public void setReader(Reader input)(Code) | | Sets the internal input stream.
Parameters: input - reader to pull from. |
setSizes | public void setSizes(int maxReadSize, int blockReadSize)(Code) | | Sets the internal sizes.
|
|
|