@@ -159,6 +159,10 @@ public class BinaryThreadRecorder implements ThreadRecorder {
159159 /** Pending consecutive exits. */
160160 protected long pendingExits = 0L ;
161161
162+ /**
163+ * @param outputDir Path to output directory
164+ * @throws IOException If an I/O error occurs when opening an output stream.
165+ */
162166 public BinaryThreadRecorder (Path outputDir ) throws IOException {
163167 this .fileName = "thread-" + Thread .currentThread ().getId () + ".flow" ;
164168 this .out =
@@ -171,6 +175,9 @@ public BinaryThreadRecorder(Path outputDir) throws IOException {
171175 64 * 1024 );
172176 }
173177
178+ /**
179+ * @return The file name this recorder is writing to
180+ */
174181 public String getFileName () {
175182 return fileName ;
176183 }
@@ -186,6 +193,11 @@ public void exit() throws IOException {
186193 pendingExits ++;
187194 }
188195
196+ /**
197+ * Flush a pending exit event if there is one.
198+ *
199+ * @throws IOException If an I/O error occurs when writing to file.
200+ */
189201 protected void flushPendingExits () throws IOException {
190202 if (pendingExits == 0L ) {
191203 return ;
@@ -204,6 +216,9 @@ protected void flushPendingExits() throws IOException {
204216 * bit 7 : continuation (1 if more bytes follow)
205217 * bits 6-0 : next 7 bits of value
206218 * </code></pre>
219+ *
220+ * @param value The positive integer to encode
221+ * @throws IOException If an I/O error occurs when writing to file.
207222 */
208223 protected void writeVarInt (long value ) throws IOException {
209224 while ((value & M_PAYLOAD_REST ) != 0 ) {
@@ -225,6 +240,10 @@ protected void writeVarInt(long value) throws IOException {
225240 * </code></pre>
226241 *
227242 * Following bytes (if any) are encoded using {@link #writeVarInt(long) writeVarInt}.
243+ *
244+ * @param flag The event flag
245+ * @param value The positive integer to encode
246+ * @throws IOException If an I/O error occurs when writing to file.
228247 */
229248 protected void writeFlagAndVarInt (int flag , long value ) throws IOException {
230249 // Extract lowest 6 bits for first byte
0 commit comments