@Override public FileWriteTaskResult call() throws FileNotFoundException, IOException { FileChannel openedChannel; if (channel == null) { openedChannel = openChannel(file); } else { openedChannel = channel; } buffer.flipFloats(); openedChannel.write(buffer.asByteBuffer()); buffer.clear(); FileWriteTaskResult result = new FileWriteTaskResult(openedChannel, buffer); return result; }
public AlwaysStreamedBuffer(SyncBuffer buffer) { buffer.clear(); this.result = new FileWriteTaskResult(null, buffer); }