001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: /**
018: * @author Rustem V. Rafikov
019: * @version $Revision: 1.2 $
020: */package javax.imageio.stream;
021:
022: import java.io.DataInput;
023: import java.io.IOException;
024: import java.nio.ByteOrder;
025:
026: public interface ImageInputStream extends DataInput {
027:
028: void setByteOrder(ByteOrder byteOrder);
029:
030: ByteOrder getByteOrder();
031:
032: int read() throws IOException;
033:
034: int read(byte[] b) throws IOException;
035:
036: int read(byte[] b, int off, int len) throws IOException;
037:
038: void readBytes(IIOByteBuffer buf, int len) throws IOException;
039:
040: boolean readBoolean() throws IOException;
041:
042: byte readByte() throws IOException;
043:
044: int readUnsignedByte() throws IOException;
045:
046: short readShort() throws IOException;
047:
048: int readUnsignedShort() throws IOException;
049:
050: char readChar() throws IOException;
051:
052: int readInt() throws IOException;
053:
054: long readUnsignedInt() throws IOException;
055:
056: long readLong() throws IOException;
057:
058: float readFloat() throws IOException;
059:
060: double readDouble() throws IOException;
061:
062: String readLine() throws IOException;
063:
064: String readUTF() throws IOException;
065:
066: void readFully(byte[] b, int off, int len) throws IOException;
067:
068: void readFully(byte[] b) throws IOException;
069:
070: void readFully(short[] s, int off, int len) throws IOException;
071:
072: void readFully(char[] c, int off, int len) throws IOException;
073:
074: void readFully(int[] i, int off, int len) throws IOException;
075:
076: void readFully(long[] l, int off, int len) throws IOException;
077:
078: void readFully(float[] f, int off, int len) throws IOException;
079:
080: void readFully(double[] d, int off, int len) throws IOException;
081:
082: long getStreamPosition() throws IOException;
083:
084: int getBitOffset() throws IOException;
085:
086: void setBitOffset(int bitOffset) throws IOException;
087:
088: int readBit() throws IOException;
089:
090: long readBits(int numBits) throws IOException;
091:
092: long length() throws IOException;
093:
094: int skipBytes(int n) throws IOException;
095:
096: long skipBytes(long n) throws IOException;
097:
098: void seek(long pos) throws IOException;
099:
100: void mark();
101:
102: void reset() throws IOException;
103:
104: void flushBefore(long pos) throws IOException;
105:
106: void flush() throws IOException;
107:
108: long getFlushedPosition();
109:
110: boolean isCached();
111:
112: boolean isCachedMemory();
113:
114: boolean isCachedFile();
115:
116: void close() throws IOException;
117: }
|