/** * Writes the specified byte to this output stream. The general * contract for write is that one byte is written to the output * stream. The byte to be written is the eight low-order bits of * the argument b. The 24 high-order bits of b are ignored. * * @param b the byte. * @exception IOException if an I/O error occurs. In particular, * an IOException may be thrown if the * output stream has been closed, or if the * writer tries to write too much data. */ public void write(int b) throws IOException { limitCheck(1); _stream.write(b); }
/** * Writes the specified byte to this output stream. The general * contract for write is that one byte is written to the output * stream. The byte to be written is the eight low-order bits of * the argument b. The 24 high-order bits of b are ignored. * * @param b the byte. * @exception IOException if an I/O error occurs. In particular, * an IOException may be thrown if the * output stream has been closed, or if the * writer tries to write too much data. */ public void write(int b) throws IOException { limitCheck(1); _stream.write(b); }
/** * Writes len bytes from the specified byte array starting at * offset off to this output stream. The general contract for * write(b, off, len) is that some of the bytes in the array b are * written to the output stream in order; element b[off] is the * first byte written and b[off+len-1] is the last byte written by * this operation.<p> * If b is null, a NullPointerException is thrown.<p> * If off is negative, or len is negative, or off+len is greater * than the length of the array b, then an * IndexOutOfBoundsException is thrown. * * @param b the data. * @param off the start offset in the data. * @param len the number of bytes to write. * @exception IOException if an I/O error occurs. In particular, * an IOException</code> is thrown if the * output stream is closed or if the writer * tries to write too many bytes. */ public void write(byte b[], int off, int len) throws IOException { limitCheck(len); _stream.write(b, off, len); }
/** * Writes len bytes from the specified byte array starting at * offset off to this output stream. The general contract for * write(b, off, len) is that some of the bytes in the array b are * written to the output stream in order; element b[off] is the * first byte written and b[off+len-1] is the last byte written by * this operation.<p> * If b is null, a NullPointerException is thrown.<p> * If off is negative, or len is negative, or off+len is greater * than the length of the array b, then an * IndexOutOfBoundsException is thrown. * * @param b the data. * @param off the start offset in the data. * @param len the number of bytes to write. * @exception IOException if an I/O error occurs. In particular, * an IOException</code> is thrown if the * output stream is closed or if the writer * tries to write too many bytes. */ public void write(byte b[], int off, int len) throws IOException { limitCheck(len); _stream.write(b, off, len); }