/** * Writes to the output stream the eight low- * order bits of the argument <code>v</code>. * The 24 high-order bits of <code>v</code> * are ignored. (This means that <code>writeByte</code> * does exactly the same thing as <code>write</code> * for an integer argument.) The byte written * by this method may be read by the <code>readByte</code> * method of interface <code>DataInput</code>, * which will then return a <code>byte</code> * equal to <code>(byte)v</code>. * * @param v the byte value to be written. * @exception IOException if an I/O error occurs. */ public final void writeByte(int v) throws IOException { write(v); }
/** * Writes a <code>boolean</code> value to this output stream. * If the argument <code>v</code> * is <code>true</code>, the value <code>(byte)1</code> * is written; if <code>v</code> is <code>false</code>, * the value <code>(byte)0</code> is written. * The byte written by this method may * be read by the <code>readBoolean</code> * method of interface <code>DataInput</code>, * which will then return a <code>boolean</code> * equal to <code>v</code>. * * @param v the boolean to be written. * @exception IOException if an I/O error occurs. */ public final void writeBoolean(boolean v) throws IOException { write(v ? 1 : 0); }
/** * Writes a <code>boolean</code> value to this output stream. * If the argument <code>v</code> * is <code>true</code>, the value <code>(byte)1</code> * is written; if <code>v</code> is <code>false</code>, * the value <code>(byte)0</code> is written. * The byte written by this method may * be read by the <code>readBoolean</code> * method of interface <code>DataInput</code>, * which will then return a <code>boolean</code> * equal to <code>v</code>. * * @param v the boolean to be written. * @exception IOException if an I/O error occurs. */ public final void writeBoolean(boolean v) throws IOException { write(v ? 1 : 0); }
/** * Writes to the output stream the eight low- * order bits of the argument <code>v</code>. * The 24 high-order bits of <code>v</code> * are ignored. (This means that <code>writeByte</code> * does exactly the same thing as <code>write</code> * for an integer argument.) The byte written * by this method may be read by the <code>readByte</code> * method of interface <code>DataInput</code>, * which will then return a <code>byte</code> * equal to <code>(byte)v</code>. * * @param v the byte value to be written. * @exception IOException if an I/O error occurs. */ public final void writeByte(int v) throws IOException { write(v); }