com.hlcl.rql.util.as
Class BOMUtil

java.lang.Object
  extended by com.hlcl.rql.util.as.BOMUtil

public class BOMUtil
extends java.lang.Object


Field Summary
static byte[][] BOMBYTES
           
static int MAXBOMBYTES
           
static int NONE
           
static int UTF16BE
           
static byte[] UTF16BEBOMBYTES
           
static int UTF16LE
           
static byte[] UTF16LEBOMBYTES
           
static int UTF32BE
           
static byte[] UTF32BEBOMBYTES
           
static int UTF32LE
           
static byte[] UTF32LEBOMBYTES
           
static int UTF8
           
static byte[] UTF8BOMBYTES
           
 
Constructor Summary
BOMUtil()
           
 
Method Summary
static int getBOMType(byte[] _bomBytes)
           
static int getBOMType(byte[] _bomBytes, int _length)
           
static int getBOMType(java.io.File _f)
           
static java.io.Reader getReader(java.io.File _f, java.lang.String encoding)
          Just reads necessary bytes from the stream
static int getSkipBytes(int BOMType)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
See Also:
Constant Field Values

UTF32BE

public static final int UTF32BE
See Also:
Constant Field Values

UTF32LE

public static final int UTF32LE
See Also:
Constant Field Values

UTF16BE

public static final int UTF16BE
See Also:
Constant Field Values

UTF16LE

public static final int UTF16LE
See Also:
Constant Field Values

UTF8

public static final int UTF8
See Also:
Constant Field Values

UTF32BEBOMBYTES

public static final byte[] UTF32BEBOMBYTES

UTF32LEBOMBYTES

public static final byte[] UTF32LEBOMBYTES

UTF16BEBOMBYTES

public static final byte[] UTF16BEBOMBYTES

UTF16LEBOMBYTES

public static final byte[] UTF16LEBOMBYTES

UTF8BOMBYTES

public static final byte[] UTF8BOMBYTES

BOMBYTES

public static final byte[][] BOMBYTES

MAXBOMBYTES

public static final int MAXBOMBYTES
See Also:
Constant Field Values
Constructor Detail

BOMUtil

public BOMUtil()
Method Detail

getBOMType

public static int getBOMType(byte[] _bomBytes)

getBOMType

public static int getBOMType(byte[] _bomBytes,
                             int _length)

getBOMType

public static int getBOMType(java.io.File _f)
                      throws java.io.IOException
Throws:
java.io.IOException

getSkipBytes

public static int getSkipBytes(int BOMType)

getReader

public static java.io.Reader getReader(java.io.File _f,
                                       java.lang.String encoding)
                                throws java.io.IOException
Just reads necessary bytes from the stream

Parameters:
_fIn -
Throws:
java.io.IOException