java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.std.OfStream
All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class OfStream extends JoltPhysicsObject
An output file stream. (native type: std::ofstream)
  • Constructor Details

    • OfStream

      public OfStream()
      Instantiate a default file stream.
    • OfStream

      public OfStream(String fileName, int streamMode)
      Open a file for output.
      Parameters:
      fileName - the name of the file to open (not null)
      streamMode - the desired mode bits or-ed together (see StreamOutWrapper)
  • Method Details

    • closeStream

      public void closeStream()
      Close the stream. (native function: close())
    • open

      public void open(String fileName, int streamMode)
      Open a file for output.
      Parameters:
      fileName - the name of the file to open (not null)
      streamMode - the desired mode bits or-ed together (see StreamOutWrapper)
    • tellp

      public int tellp()
      Return the output position.
      Returns:
      buffer position relative to the first character, or -1 to indicate a failure