public class

JiraFileInputStream

extends InputStream
java.lang.Object
   ↳ java.io.InputStream
     ↳ com.atlassian.jira.util.xml.JiraFileInputStream

Class Overview

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

Summary

Constants
int MAXBOMBYTES No bom sequence is longer than 4 bytes
int NONE
Fields
public static final byte[][] BOMBYTES
public static final byte[] UTF16BEBOMBYTES
public static final byte[] UTF16LEBOMBYTES
public static final byte[] UTF32BEBOMBYTES
public static final byte[] UTF32LEBOMBYTES
public static final byte[] UTF8BOMBYTES
Public Constructors
JiraFileInputStream(File file, String zipEntryName)
Public Methods
void close()
long getSize()
int read()
int read(byte[] b, int off, int len)
[Expand]
Inherited Methods
From class java.io.InputStream
From class java.lang.Object
From interface java.io.Closeable
From interface java.lang.AutoCloseable

Constants

public static final int MAXBOMBYTES

No bom sequence is longer than 4 bytes

Constant Value: 4 (0x00000004)

public static final int NONE

Constant Value: -1 (0xffffffff)

Fields

public static final byte[][] BOMBYTES

public static final byte[] UTF16BEBOMBYTES

public static final byte[] UTF16LEBOMBYTES

public static final byte[] UTF32BEBOMBYTES

public static final byte[] UTF32LEBOMBYTES

public static final byte[] UTF8BOMBYTES

Public Constructors

public JiraFileInputStream (File file, String zipEntryName)

Throws
IOException

Public Methods

public void close ()

Throws
IOException

public long getSize ()

public int read ()

Throws
IOException

public int read (byte[] b, int off, int len)

Throws
IOException