com.atlassian.jira.util.xml
Class JiraFileInputStream
java.lang.Object
java.io.InputStream
com.atlassian.jira.util.xml.JiraFileInputStream
- All Implemented Interfaces:
- Closeable
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
Method Summary |
long |
getSize()
|
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
JiraFileInputStream
public JiraFileInputStream(File file)
throws IOException,
FileNotFoundException
- Throws:
IOException
FileNotFoundException
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
getSize
public long getSize()
Copyright © 2002-2012 Atlassian. All Rights Reserved.