java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.std.OfStream
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
An output file stream. (native type: std::ofstream)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Close the stream.void
Open a file for output.int
tellp()
Return the output position.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
OfStream
public OfStream()Instantiate a default file stream. -
OfStream
Open a file for output.- Parameters:
fileName
- the name of the file to open (not null)streamMode
- the desired mode bits or-ed together (seeStreamOutWrapper
)
-
-
Method Details
-
closeStream
public void closeStream()Close the stream. (native function:close()
) -
open
Open a file for output.- Parameters:
fileName
- the name of the file to open (not null)streamMode
- the desired mode bits or-ed together (seeStreamOutWrapper
)
-
tellp
public int tellp()Return the output position.- Returns:
- buffer position relative to the first character, or -1 to indicate a failure
-