org.fudgemsg
Class ModifiedUTF8Util

java.lang.Object
  extended by org.fudgemsg.ModifiedUTF8Util

Deprecated.

@Deprecated
public class ModifiedUTF8Util
extends Object

Code relating to working with Modified UTF-8 data. The code here was originally in DataInputStream and DataOutputStream, but it's been improved and modified to suit the use of Fudge in a superior way. Deprecated in favour of using proper UTF8 instead.


Constructor Summary
ModifiedUTF8Util()
          Deprecated.  
 
Method Summary
static String decodeString(byte[] bytearr)
          Deprecated.  
static byte[] encodeAsModifiedUTF8(String str)
          Deprecated.  
static int modifiedUTF8Length(String str)
          Deprecated.  
static String readString(DataInput is, int utflen)
          Deprecated.  
static int writeModifiedUTF8(String str, DataOutput os)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifiedUTF8Util

public ModifiedUTF8Util()
Deprecated. 
Method Detail

modifiedUTF8Length

public static int modifiedUTF8Length(String str)
Deprecated. 
Parameters:
str - string to calculate length of
Returns:
length in bytes

encodeAsModifiedUTF8

public static byte[] encodeAsModifiedUTF8(String str)
                                   throws UTFDataFormatException
Deprecated. 
Parameters:
str - string to encode
Returns:
byte encoding
Throws:
UTFDataFormatException - if the string is too long

writeModifiedUTF8

public static int writeModifiedUTF8(String str,
                                    DataOutput os)
                             throws IOException
Deprecated. 
Parameters:
str - string to write
os - target to write to
Returns:
the number of bytes written
Throws:
IOException - if the target raises one

readString

public static String readString(DataInput is,
                                int utflen)
                         throws IOException
Deprecated. 
Parameters:
is - source to read from
utflen - number of bytes to read
Returns:
the string read
Throws:
IOException - if the source raises one or the UTF data is malformed

decodeString

public static String decodeString(byte[] bytearr)
                           throws UTFDataFormatException
Deprecated. 
Parameters:
bytearr - byte data to decode
Returns:
the decoded string
Throws:
UTFDataFormatException - if the byte data is not valid UTF-8


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0