com.atlassian.jira.util.xml
Class JiraFileInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended bycom.atlassian.jira.util.xml.JiraFileInputStream

public class JiraFileInputStream
extends InputStream

An input streams that handles Unicode Byte-Order Mark (BOM) marker within a normal file as well as a ZIP file. Distilled and adapted from http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6206835


Field Summary
static byte[][] BOMBYTES
           
static int MAXBOMBYTES
          No bom sequence is longer than 4 bytes
static int NONE
           
static byte[] UTF16BEBOMBYTES
           
static byte[] UTF16LEBOMBYTES
           
static byte[] UTF32BEBOMBYTES
           
static byte[] UTF32LEBOMBYTES
           
static byte[] UTF8BOMBYTES
           
 
Constructor Summary
JiraFileInputStream(String fileName)
           
 
Method Summary
 int read()
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

NONE

public static final int NONE
See Also:
Constant Field Values

MAXBOMBYTES

public static final int MAXBOMBYTES
No bom sequence is longer than 4 bytes

See Also:
Constant Field Values
Constructor Detail

JiraFileInputStream

public JiraFileInputStream(String fileName)
                    throws IOException,
                           FileNotFoundException
Method Detail

read

public int read()
         throws IOException
Throws:
IOException


Copyright © 2002-2007 Atlassian. All Rights Reserved.