private static void writeBufferToFile(ByteBuffer buffer, FileOutputStream outputFileStream) throws IOException {
    byte[] bytes = new byte[buffer.remaining()];
    buffer.get(bytes);
    outputFileStream.write(bytes);
  }
Writes the content of {@code buffer} into {@link ServerAdminToolConfig#dataOutputFilePath}.
@param buffer the {@link ByteBuffer} whose content needs to be written.
@param outputFileStream the {@link FileOutputStream} to write to.
@throws IOException
ambry-tools/src/main/java/com/github/ambry/tools/admin/ServerAdminTool.java