Package com.github.stephengold.joltjni
Class StateRecorderImpl
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.StateRecorder
com.github.stephengold.joltjni.StateRecorderImpl
- All Implemented Interfaces:
- ConstJoltPhysicsObject,- AutoCloseable,- Comparable<JoltPhysicsObject>
Full implementation of 
StateRecorder, using stringstream.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbyte[]getData()Read binary data.voidwriteBytes(byte[] data) Write binary data.voidwriteBytes(byte[] data, int numBytes) Write binary data.Methods inherited from class com.github.stephengold.joltjni.StateRecorderisValidating, readBodyIdVector, readBoolean, readFloat, readInt, readRMat44, readRVec3, readString, readVec3, setValidating, write, write, write, write, write, write, write, writeMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObjectclose, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
- 
Constructor Details- 
StateRecorderImplpublic StateRecorderImpl()Instantiate a recorder.
 
- 
- 
Method Details- 
getDatapublic byte[] getData()Read binary data.- Returns:
- the bytes that were read
 
- 
writeBytespublic void writeBytes(byte[] data) Write binary data.- Parameters:
- data- the bytes to write (not null, unaffected)
 
- 
writeBytespublic void writeBytes(byte[] data, int numBytes) Write binary data.- Parameters:
- data- the bytes to write (not null, unaffected)
- numBytes- the number of byte to write (≥0)
 
 
-