Ejemplo n.º 1
0
 /// <summary>
 ///     See the general contract of the <code>readDouble</code>
 ///     method of <code>DataInput</code>.
 /// </summary>
 /// <remarks>
 ///     See the general contract of the <code>readDouble</code>
 ///     method of <code>DataInput</code>.
 ///     <p>
 ///         Bytes
 ///         for this operation are read from the contained
 ///         input stream.
 /// </remarks>
 /// <returns>
 ///     the next eight bytes of this input stream, interpreted as a
 ///     <code>double</code>.
 /// </returns>
 /// <exception>
 ///     EOFException
 ///     if this input stream reaches the end before
 ///     reading eight bytes.
 /// </exception>
 /// <exception>
 ///     IOException
 ///     the stream has been closed and the contained
 ///     input stream does not support reading after close, or
 ///     another I/O error occurs.
 /// </exception>
 /// <seealso cref="ReadLong()" />
 /// <seealso cref="double.LongBitsToDouble(long)" />
 /// <exception cref="System.IO.IOException" />
 public double ReadDouble()
 {
     return(Runtime.LongBitsToDouble(ReadLong()));
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Converts the float argument to an <code>int</code> using the
 ///     <code>floatToIntBits</code> method in class <code>Float</code>,
 ///     and then writes that <code>int</code> value to the underlying
 ///     output stream as a 4-byte quantity, high byte first.
 /// </summary>
 /// <remarks>
 ///     Converts the float argument to an <code>int</code> using the
 ///     <code>floatToIntBits</code> method in class <code>Float</code>,
 ///     and then writes that <code>int</code> value to the underlying
 ///     output stream as a 4-byte quantity, high byte first. If no
 ///     exception is thrown, the counter <code>written</code> is
 ///     incremented by <code>4</code>.
 /// </remarks>
 /// <param name="v">a <code>float</code> value to be written.</param>
 /// <exception>
 ///     IOException
 ///     if an I/O error occurs.
 /// </exception>
 /// <seealso cref="FilterOutputStream.@out" />
 /// <seealso cref="Sharpen.Runtime.FloatToIntBits(float)" />
 /// <exception cref="System.IO.IOException" />
 public void WriteFloat(float v)
 {
     WriteInt(Runtime.FloatToIntBits(v));
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     See the general contract of the <code>readFloat</code>
 ///     method of <code>DataInput</code>.
 /// </summary>
 /// <remarks>
 ///     See the general contract of the <code>readFloat</code>
 ///     method of <code>DataInput</code>.
 ///     <p>
 ///         Bytes
 ///         for this operation are read from the contained
 ///         input stream.
 /// </remarks>
 /// <returns>
 ///     the next four bytes of this input stream, interpreted as a
 ///     <code>float</code>.
 /// </returns>
 /// <exception>
 ///     EOFException
 ///     if this input stream reaches the end before
 ///     reading four bytes.
 /// </exception>
 /// <exception>
 ///     IOException
 ///     the stream has been closed and the contained
 ///     input stream does not support reading after close, or
 ///     another I/O error occurs.
 /// </exception>
 /// <seealso cref="ReadInt()" />
 /// <seealso cref="Sharpen.Runtime.IntBitsToFloat(int)" />
 /// <exception cref="System.IO.IOException" />
 public float ReadFloat()
 {
     return(Runtime.IntBitsToFloat(ReadInt()));
 }