ImageOutputStreamWrapperpublic class ImageOutputStreamWrapper extends OutputStream
Fields Summary |
---|
protected ImageOutputStream | mIos | private byte[] | mBuff |
Constructors Summary |
---|
public ImageOutputStreamWrapper(ImageOutputStream ios)
if (null == ios) {
throw new IllegalArgumentException("ImageOutputStream must not be null");
}
this.mIos = ios;
this.mBuff = new byte[1];
|
Methods Summary |
---|
public void | close()
if (mIos == null) {
throw new IOException("Stream already closed");
}
mIos = null;
| public void | flush()
mIos.flush();
| public javax.imageio.stream.ImageOutputStream | getImageOutputStream()
return mIos;
| public void | write(int oneByte)
mBuff[0] = (byte)oneByte;
mIos.write(mBuff, 0, 1);
| public void | write(byte[] b)
mIos.write(b, 0, b.length);
| public void | write(byte[] b, int off, int len)
mIos.write(b, off, len);
|
|