1

I need to write bytes to a file from multiple threads in java, at a specific offset of the file.

The fs.write from NodeJS takes the next arguments:

fs.write(fd, buffer, offset, length, position, callback)

The "position" argument reffers to the offset within the file, where a byte buffer will be written.

FileOutputStream, BufferedOutputStream etc, takes as arguments just the byte buffer, the offset within the buffer and the length of the buffer, but no the offset within the file.

What is the equivalent in java for this situation?

xplore
  • 11
  • 1

0 Answers0