46 |
/** |
/** |
47 |
* @author Michael Koch (konqueror@gmx.de) |
* @author Michael Koch (konqueror@gmx.de) |
48 |
*/ |
*/ |
49 |
public class FileImageInputStream |
public class FileImageInputStream extends ImageInputStreamImpl |
50 |
{ |
{ |
51 |
private RandomAccessFile file; |
private RandomAccessFile file; |
52 |
|
|
84 |
return -1L; |
return -1L; |
85 |
} |
} |
86 |
} |
} |
87 |
|
|
88 |
|
public int read() |
89 |
|
throws IOException |
90 |
|
{ |
91 |
|
setBitOffset(0); |
92 |
|
return file.read(); |
93 |
|
} |
94 |
|
|
95 |
|
public int read(byte[] data, int offset, int len) |
96 |
|
throws IOException |
97 |
|
{ |
98 |
|
setBitOffset(0); |
99 |
|
return file.read(data, offset, len); |
100 |
|
} |
101 |
|
|
102 |
|
public void seek(long position) |
103 |
|
throws IOException |
104 |
|
{ |
105 |
|
super.seek(position); |
106 |
|
file.seek(position); |
107 |
|
} |
108 |
} |
} |