Package com.github.stephengold.joltjni
Class StreamOutWrapper
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.StreamOut
com.github.stephengold.joltjni.StreamOutWrapper
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<ConstJoltPhysicsObject>
A wrapper around an
std::ofstream.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intapp()Return the mode bit for a stream that appends to existing content.static intate()Return the mode bit for a stream whose output position starts at the end of the file.static intbinary()Return the mode bit for a binary-mode stream.static intin()Return the mode bit for a stream that supports input operations.static intout()Return the mode bit for a stream that supports output operations.static inttrunc()Return the mode bit for a stream that discards pre-existing content when opened.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, va
-
Constructor Details
-
StreamOutWrapper
Open a new stream.- Parameters:
fileName- the name of the file to open (not null)streamMode- the desired mode bits or-ed together
-
-
Method Details
-
app
public static int app()Return the mode bit for a stream that appends to existing content.- Returns:
- the value of
std::ofstream::app
-
ate
public static int ate()Return the mode bit for a stream whose output position starts at the end of the file.- Returns:
- the value of
std::ofstream::ate
-
binary
public static int binary()Return the mode bit for a binary-mode stream.- Returns:
- the value of
std::ofstream::binary
-
in
public static int in()Return the mode bit for a stream that supports input operations.- Returns:
- the value of
std::ofstream::in
-
out
public static int out()Return the mode bit for a stream that supports output operations.- Returns:
- the value of
std::ofstream::out
-
trunc
public static int trunc()Return the mode bit for a stream that discards pre-existing content when opened.- Returns:
- the value of
std::ofstream::trunc
-