/** * Writes the specified <code>byte</code> to this output stream. * <p> * The <code>write</code> method of <code>FilterOutputStream</code> * calls the <code>write</code> method of its underlying output stream, * that is, it performs <tt>out.write(b)</tt>. * <p> * Implements the abstract <tt>write</tt> method of <tt>OutputStream</tt>. * * @param b the <code>byte</code>. * @exception IOException if an I/O error occurs. */ public void write(int b) throws IOException { final byte[] buf = new byte[1]; buf[0] = (byte)b; write(buf, 0, 1); }
/** * Writes <code>b.length</code> bytes to this output stream. * <p> * The <code>write</code> method of <code>FilterOutputStream</code> * calls its <code>write</code> method of three arguments with the * arguments <code>b</code>, <code>0</code>, and * <code>b.length</code>. * <p> * Note that this method does not call the one-argument * <code>write</code> method of its underlying stream with the single * argument <code>b</code>. * * @param b the data to be written. * @exception IOException if an I/O error occurs. * @see java.io.FilterOutputStream#write(byte[], int, int) */ public void write(byte b[]) throws IOException { write(b, 0, b.length); }
/** * Writes <code>b.length</code> bytes to this output stream. * <p> * The <code>write</code> method of <code>FilterOutputStream</code> * calls its <code>write</code> method of three arguments with the * arguments <code>b</code>, <code>0</code>, and * <code>b.length</code>. * <p> * Note that this method does not call the one-argument * <code>write</code> method of its underlying stream with the single * argument <code>b</code>. * * @param b the data to be written. * @exception IOException if an I/O error occurs. * @see java.io.FilterOutputStream#write(byte[], int, int) */ public void write(byte b[]) throws IOException { write(b, 0, b.length); }
/** * Writes the specified <code>byte</code> to this output stream. * <p> * The <code>write</code> method of <code>FilterOutputStream</code> * calls the <code>write</code> method of its underlying output stream, * that is, it performs <tt>out.write(b)</tt>. * <p> * Implements the abstract <tt>write</tt> method of <tt>OutputStream</tt>. * * @param b the <code>byte</code>. * @exception IOException if an I/O error occurs. */ public void write(int b) throws IOException { final byte[] buf = new byte[1]; buf[0] = (byte)b; write(buf, 0, 1); }
/** * Writes <code>b.length</code> bytes to this output stream. * <p> * The <code>write</code> method of <code>FilterOutputStream</code> * calls its <code>write</code> method of three arguments with the * arguments <code>b</code>, <code>0</code>, and * <code>b.length</code>. * <p> * Note that this method does not call the one-argument * <code>write</code> method of its underlying stream with the single * argument <code>b</code>. * * @param b the data to be written. * @exception IOException if an I/O error occurs. * @see java.io.FilterOutputStream#write(byte[], int, int) */ @Override public void write(byte b[]) throws IOException { write(b, 0, b.length); }
/** * Writes the specified <code>byte</code> to this output stream. * <p> * The <code>write</code> method of <code>FilterOutputStream</code> * calls the <code>write</code> method of its underlying output stream, * that is, it performs <tt>out.write(b)</tt>. * <p> * Implements the abstract <tt>write</tt> method of <tt>OutputStream</tt>. * * @param b the <code>byte</code>. * @exception IOException if an I/O error occurs. */ @Override public void write(int b) throws IOException { final byte[] buf = new byte[1]; buf[0] = (byte)b; write(buf, 0, 1); }
/** * Writes the specified <code>byte</code> to this output stream. * <p> * The <code>write</code> method of <code>FilterOutputStream</code> * calls the <code>write</code> method of its underlying output stream, * that is, it performs <tt>out.write(b)</tt>. * <p> * Implements the abstract <tt>write</tt> method of <tt>OutputStream</tt>. * * @param b the <code>byte</code>. * @exception IOException if an I/O error occurs. */ @Override public void write(int b) throws IOException { final byte[] buf = new byte[1]; buf[0] = (byte)b; write(buf, 0, 1); }
/** * Writes <code>b.length</code> bytes to this output stream. * <p> * The <code>write</code> method of <code>FilterOutputStream</code> * calls its <code>write</code> method of three arguments with the * arguments <code>b</code>, <code>0</code>, and * <code>b.length</code>. * <p> * Note that this method does not call the one-argument * <code>write</code> method of its underlying stream with the single * argument <code>b</code>. * * @param b the data to be written. * @exception IOException if an I/O error occurs. * @see java.io.FilterOutputStream#write(byte[], int, int) */ @Override public void write(byte b[]) throws IOException { write(b, 0, b.length); }
public void writeTest() { try { InputStream is = CPXTest.class.getResourceAsStream("/data/readme.txt"); //System.err.println("Is " + is); FileOutputStream fout = new FileOutputStream("C:\\tmp\\cpxFile.cpx"); CPXOutputStream cout = new CPXOutputStream(fout); byte[] buffer = new byte[1024]; int numBytes; while ((numBytes = is.read(buffer)) != -1) { cout.write(buffer, 0, numBytes); } cout.close(); } catch (Exception e) { Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, null, e); } }
public void writeTest() { try { InputStream is = CPXTest.class.getResourceAsStream("/data/readme.txt"); //System.err.println("Is " + is); FileOutputStream fout = new FileOutputStream("C:\\tmp\\cpxFile.cpx"); CPXOutputStream cout = new CPXOutputStream(fout); byte[] buffer = new byte[1024]; int numBytes; while ((numBytes = is.read(buffer)) != -1) { cout.write(buffer, 0, numBytes); } cout.close(); } catch (Exception e) { Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, null, e); } }
public void writeTest() { try { InputStream is = CPXTest.class.getResourceAsStream("/data/readme.txt"); //System.err.println("Is " + is); FileOutputStream fout = new FileOutputStream("C:\\tmp\\cpxFile.cpx"); CPXOutputStream cout = new CPXOutputStream(fout); byte[] buffer = new byte[1024]; int numBytes; while ((numBytes = is.read(buffer)) != -1) { cout.write(buffer, 0, numBytes); } cout.close(); } catch (Exception e) { Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, null, e); } }
public void writeTest() { try { InputStream is = CPXTest.class.getResourceAsStream("/data/readme.txt"); //System.err.println("Is " + is); FileOutputStream fout = new FileOutputStream("C:\\tmp\\cpxFile.cpx"); CPXOutputStream cout = new CPXOutputStream(fout); byte[] buffer = new byte[1024]; int numBytes; while ((numBytes = is.read(buffer)) != -1) { cout.write(buffer, 0, numBytes); } cout.close(); } catch (Exception e) { e.printStackTrace(); } }