public void setFrame(ImageInputStream frame) { try { this.frame.flush(); this.frame.close(); this.frame = frame; offset = frame.getStreamPosition(); this.coefProbs=Globals.getDefaultCoefProbs(); tokenBoolDecoders = new Vector<BoolDecoder>(); } catch (IOException e) { e.printStackTrace(); } } }
r.flush(); t.flush(); break;
ioStream.flush(); ioStream.close(); imgWriter.dispose();
public static void flush(ImageInputStream flushable) { if (null == flushable) { return; } try { flushable.flush(); } catch (IOException e) { // ignore } }
public static void flush(ImageInputStream flushable) { if (null == flushable) { return; } try { flushable.flush(); } catch (IOException e) { // ignore } }
@Override public void flush() throws IOException { in.flush(); }
public void flush() throws IOException { source.flush(); }
public void flush() throws IOException { source.flush(); }
public void flush() throws IOException { source.flush(); }
public void flush() throws IOException { source.flush(); }
public static void safeClose(ImageInputStream stream) { try { if (stream != null) { stream.flush(); stream.close(); } } catch (IOException e) { // Do nothing } }
public void setFrame(ImageInputStream frame) { try { this.frame.flush(); this.frame.close(); this.frame = frame; offset = frame.getStreamPosition(); this.coefProbs=Globals.getDefaultCoefProbs(); tokenBoolDecoders = new Vector<BoolDecoder>(); } catch (IOException e) { e.printStackTrace(); } } }
ios.flush(); generated=true;
ioStream.flush(); ioStream.close(); imgWriter.dispose();
int width = reader.getWidth(reader.getMinIndex()); int height = reader.getHeight(reader.getMinIndex()); stream.flush(); stream.close(); return new Dimension(width, height);
IIOImage iioimage = new IIOImage(bufferedImage, null, null); imageWriter.write(null, iioimage, imageWriteParam); imageOutputStream.flush();
private static void writeJPGtoStream(BufferedImage image, ImageInputStream ios, JpegSettings jpegSettings, ProgressTracker tracker) throws IOException { Iterator<ImageWriter> jpgWriters = ImageIO.getImageWritersByFormatName("jpg"); if (!jpgWriters.hasNext()) { throw new IllegalStateException("No JPG writers found"); } ImageWriter writer = jpgWriters.next(); ImageWriteParam imageWriteParam = writer.getDefaultWriteParam(); if (jpegSettings.isProgressive()) { imageWriteParam.setProgressiveMode(MODE_DEFAULT); } else { imageWriteParam.setProgressiveMode(MODE_DISABLED); } imageWriteParam.setCompressionMode(MODE_EXPLICIT); imageWriteParam.setCompressionQuality(jpegSettings.getQuality()); IIOImage iioImage = new IIOImage(image, null, null); writer.setOutput(ios); if (tracker != null) { writer.addIIOWriteProgressListener(new TrackerWriteProgressListener(tracker)); } writer.write(null, iioImage, imageWriteParam); ios.flush(); ios.close(); }
try { if (stream_in != null) { stream_in.flush(); stream_in.close();
try { if (stream_in != null) { stream_in.flush(); stream_in.close();