Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk.util
Class DataInputUTF8Decoder

    java.lang.Object
      com.sun.squawk.util.DataInputUTF8Decoder

    public final class DataInputUTF8Decoder

extends Object

This class provides one function for decoding a UTF-8 encoded string from a `DataInput`. This provides almost the same functionality as `DataInputStream.readUTF(DataInput)` except that it can be used to decode a UTF-8 string from a Java class file which differs from the "standard" UTF-8 format in that 0 is encoded in two bytes as opposed to one.

Method Summary
`static String` | `readUTF(DataInput in, boolean isClassFile, boolean twoByteLength)` Reads a UTF-8 encoded String from `in`.
`static String` | `readUTF(DataInput in, boolean isClassFile, int utflen)` Reads a UTF-8 encoded String from `in`.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### readUTF

    public static final String readUTF(DataInput in,
                                       boolean isClassFile,
                                       boolean twoByteLength)
                                throws IOException

  Reads a UTF-8 encoded String from `in`.

  Parameters:
    `in` - a data input stream.
    `isClassFile` - if true, then 0 is decoded from two bytes as opposed to one
    `twoByteLength` - if true, then the length of the encoded string is given in two bytes as opposed to 4
  Returns:
    the decoded string
  Throws:
    `IOException`

### readUTF

    public static final String readUTF(DataInput in,
                                       boolean isClassFile,
                                       int utflen)
                                throws IOException

  Reads a UTF-8 encoded String from `in`.

  Parameters:
    `in` - a data input stream.
    `isClassFile` - if true, then 0 is decoded from two bytes as opposed to one
    `utflen` - the numbers of bytes to be decoded
  Returns:
    the decoded string
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"