Methods Summary |
---|
public void | close()
super.close();
file.close();
|
public long | length()
try {
checkClosed();
return file.length();
} catch (IOException e) {
return super.length(); // -1L
}
|
public int | read()
checkClosed();
int rt = file.read();
if (rt != -1) {
streamPos++;
}
return rt;
|
public int | read(byte[] b, int off, int len)
checkClosed();
int rt = file.read(b, off, len);
if (rt != -1) {
streamPos += rt;
}
return rt;
|
public void | seek(long pos)
// -- checkClosed() is performed in super.seek()
super.seek(pos);
file.seek(pos);
streamPos = file.getFilePointer();
|
public void | write(int b)
checkClosed();
// according to the spec for ImageOutputStreamImpl#flushBits()
flushBits();
file.write(b);
streamPos++;
|
public void | write(byte[] b, int off, int len)
checkClosed();
// according to the spec for ImageOutputStreamImpl#flushBits()
flushBits();
file.write(b, off, len);
streamPos += len;
|