"

2013 FRC Java API

"

com.sun.squawk.util
Class DataOutputUTF8Encoder

java.lang.Object
  extended by com.sun.squawk.util.DataOutputUTF8Encoder

public final class DataOutputUTF8Encoder
extends Object

This class provides one function for UTF-8 encoding a string to a DataOutput. This provides almost the same functionality as DataOutputStream.writeUTF(java.lang.String) except that it can be used to encode a UTF-8 string with a 4-byte length header as opposed to the standard 2-byte length header.


Method Summary
static int writeUTF(String str, DataOutput out, boolean twoByteLength)
          Writes a string to out in UTF-8 encoded form.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeUTF

public static final int writeUTF(String str,
                                 DataOutput out,
                                 boolean twoByteLength)
                          throws IOException
Writes a string to out in UTF-8 encoded form.

Parameters:
str - the string to encode
out - a data output stream.
twoByteLength - if true, then the length of the encoded string is to be encoded in two bytes as opposed to 4
Returns:
the decoded string
Throws:
IOException

"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"