Example usage for javax.imageio.stream MemoryCacheImageInputStream getStreamPosition

List of usage examples for javax.imageio.stream MemoryCacheImageInputStream getStreamPosition

Introduction

In this page you can find the example usage for javax.imageio.stream MemoryCacheImageInputStream getStreamPosition.

Prototype

public long getStreamPosition() throws IOException 

Source Link

Usage

From source file:org.apache.pdfbox.filter.LZWFilter.java

private void checkIndexBounds(List codeTable, long index, MemoryCacheImageInputStream in) throws IOException {
    if (index < 0) {
        throw new IOException("negative array index: " + index + " near offset " + in.getStreamPosition());
    }/* ww w  . j  ava  2  s  .co m*/
    if (index >= codeTable.size()) {
        throw new IOException("array index overflow: " + index + " >= " + codeTable.size() + " near offset "
                + in.getStreamPosition());
    }
}