Package net.cnri.util
Class StreamObjectUtil
java.lang.Object
net.cnri.util.StreamObjectUtil
Utility functions used to ease the parsing and encoding of StreamObjects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Read from the specified reader until a non-whitespace character is read.static String
readString
(Reader in) This function reads in a string token assuming the first qoute (") has been read already.static String
readUndelimitedString
(Reader in, int firstChar) This function reads in a string given that the string is not delimited with a quote.static void
writeEncodedString
(Writer out, String str)
-
Constructor Details
-
StreamObjectUtil
public StreamObjectUtil()
-
-
Method Details
-
getNonWhitespace
Read from the specified reader until a non-whitespace character is read. When a non-whitespace character is read, return it.- Throws:
IOException
-
readUndelimitedString
This function reads in a string given that the string is not delimited with a quote. It will read in anything up to but not including anything that might delimit a word.- Throws:
IOException
-
readString
This function reads in a string token assuming the first qoute (") has been read already.- Throws:
StringEncodingException
IOException
-
writeEncodedString
- Throws:
IOException
-