code: public void sendfile(OutputStream os, long offset, long length)
      throws IOException
    {
      if (os instanceof OutputStreamWithBuffer) {
        writeToStream((OutputStreamWithBuffer) os);
      }
      else {
        writeToStream(os);
      }
    }
docs: Utility to write the contents of this path to the destination stream.
  
  @param os destination stream.