com.atlassian.jira.util.xml
Class JiraFileInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.atlassian.jira.util.xml.JiraFileInputStream
All Implemented Interfaces:
java.io.Closeable

public class JiraFileInputStream
extends java.io.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(java.lang.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(java.lang.String fileName)
                    throws java.io.IOException,
                           java.io.FileNotFoundException
Throws:
java.io.IOException
java.io.FileNotFoundException
Method Detail

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException


Copyright © 2002-2010 Atlassian. All Rights Reserved.