J.Output.Data

opaque type Data

J.Output.Data is an opaque value, backed by java.io.DataOutputStream

Source
Data.scala

Def

inline def boolean(v: Boolean): J.Output.Data

Write Boolean

Write Boolean

Writes a boolean value to this output stream

If the argument v is true, the value (short)1 is written; if v is false, the value (short)0 is written

The short written by this method may be read by the Input.Data.boolean

Source
Data.scala
inline def byte(v: Int): J.Output.Data

Write Byte

Write Byte

Writes to the output stream the eight low- order bits of the argument v

The 24 high-order bits of v are ignored. (This means that writeByte does exactly the same thing as write for an integer argument.)

The short written by this method may be read by the Input.Data.short

Source
Data.scala
inline def byte(v: String): J.Output.Data

Write Bytes

Write Bytes

Writes a string to the output stream

For every character in the string s, taken in order, one short is written to the output stream

If s is null, a NullPointerException is thrown

If s.length is zero, then no byte are written. Otherwise, the character s[0] is written first, then s[1], and so on; the last character written is s[s.length-1]

For each character, one short is written, the low-order short, in exactly the manner of the writeByte method

The high-order eight bits of each character in the string are ignored.

Source
Data.scala
inline def char(v: Int): J.Output.Data

Write Char

Write Char

Writes a char value, which is comprised of two byte, to the output stream

The short values to be written, in the order shown, are:

(short)(0xff & (v >> 8))

(short)(0xff & v)

The byte written by this method may be read by the Input.Data.char

Source
Data.scala
inline def char(v: String): J.Output.Data

Write Chars

Write Chars

Writes every character in the string s, to the output stream, in order, two byte per character

If s is null, a NullPointerException is thrown

If s.length is zero, then no characters are written

Otherwise, the character s[0] is written first, then s[1], and so on; the last character written is s[s.length-1]

For each character, two byte are actually written, high-order short first, in exactly the manner of the writeChar method

Source
Data.scala
inline def double(v: Double): J.Output.Data

Write Double

Write Double

Writes a double value, which is comprised of eight byte, to the output stream

It does this as if it first converts this double value to a long in exactly the manner of the Double.doubleToLongBits method and then writes the long value in exactly the manner of the writeLong method

The byte written by this method may be read by the Input.Data.double

Source
Data.scala
inline def float(v: Float): J.Output.Data

Write Float

Write Float

Writes a float value, which is comprised of four byte, to the output stream

It does this as if it first converts this float value to an int in exactly the manner of the Float.floatToIntBits method and then writes the int value in exactly the manner of the writeInt method

The byte written by this method may be read by the Input.Data.float

Source
Data.scala
inline def flush: J.Output.Data
inline def int(v: Int): J.Output.Data

Write Int

Write Int

Writes an int value, which is comprised of four byte, to the output stream

The short values to be written, in the order shown, are:

(short)(0xff & (v >> 24))

(short)(0xff & (v >> 16))

(short)(0xff & (v >> 8))

(short)(0xff & v)

The byte written by this method may be read by the Input.Data.int

Source
Data.scala
inline def long(v: Long): J.Output.Data

Write Long

Write Long

Writes a long value, which is comprised of eight byte, to the output stream

The short values to be written, in the order shown, are:

(short)(0xff & (v >> 56))

(short)(0xff & (v >> 48))

(short)(0xff & (v >> 40))

(short)(0xff & (v >> 32))

(short)(0xff & (v >> 24))

(short)(0xff & (v >> 16))

(short)(0xff & (v >> 8))

(short)(0xff & v)

The byte written by this method may be read by the Input.Data.long

Source
Data.scala
inline def real: java.io.DataOutputStream

Real value

Real value

Returns real value standing behind the opaque type.

This is a zero cost call.

Inherited from
_methods
Source
Base.scala
inline def short(v: Int): J.Output.Data

Write Short

Write Short

Writes two byte to the output stream to represent the value of the argument

The short values to be written, in the order shown, are:

(short)(0xff & (v >> 8))

(short)(0xff & v)

The byte written by this method may be read by the Input.Data.short

Source
Data.scala
inline def utf(v: String): J.Output.Data

Write UTF

Write UTF

Details

Source
Data.scala