Package net.cnri.util

Class StreamObjectUtil

java.lang.Object
net.cnri.util.StreamObjectUtil

public abstract class StreamObjectUtil extends Object
Utility functions used to ease the parsing and encoding of StreamObjects
  • Constructor Details

    • StreamObjectUtil

      public StreamObjectUtil()
  • Method Details

    • getNonWhitespace

      public static int getNonWhitespace(Reader in) throws IOException
      Read from the specified reader until a non-whitespace character is read. When a non-whitespace character is read, return it.
      Throws:
      IOException
    • readUndelimitedString

      public static String readUndelimitedString(Reader in, int firstChar) throws IOException
      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

      public static String readString(Reader in) throws StringEncodingException, IOException
      This function reads in a string token assuming the first qoute (") has been read already.
      Throws:
      StringEncodingException
      IOException
    • writeEncodedString

      public static void writeEncodedString(Writer out, String str) throws IOException
      Throws:
      IOException