APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.utils

public Class DataOutput

extends DataOutputStream
Class Inheritance
Known Direct Subclasses
com.badlogic.gdx.utils.DataBuffer
Imports
java.io.DataOutputStream, .IOException, .OutputStream

Extends DataOutputStream with additional convenience methods.
Author
Nathan Sweet

Field Summary

Inherited from java.io.DataOutputStream:
written

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
writeInt(int value, boolean
If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be inefficient (5 bytes).
optimizePositive
)

Writes a 1-5 byte int.

public void
writeString(String
May be null.
value
)

Writes a length and then the string as UTF8.

private void
writeString_slow(String value, int charCount, int charIndex)

Inherited from java.io.DataOutputStream:
flushsizewritewritewriteBooleanwriteBytewriteByteswriteCharwriteCharswriteDoublewriteFloatwriteIntwriteLongwriteShortwriteUTF

Constructor Detail

DataOutputback to summary
public DataOutput(OutputStream out)

Method Detail

writeIntback to summary
public int writeInt(int value, boolean optimizePositive) throws IOException

Writes a 1-5 byte int.

Parameters
optimizePositive:boolean

If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be inefficient (5 bytes).

writeStringback to summary
public void writeString(String value) throws IOException

Writes a length and then the string as UTF8.

Parameters
value:String

May be null.

writeString_slowback to summary
private void writeString_slow(String value, int charCount, int charIndex) throws IOException