class NpmStreamPayload extends StreamPayload {

  @Override
  public void copy(final InputStream input, final OutputStream output) throws IOException {
    new NpmStreamingObjectMapper(packageId, revId, nonNull(fieldMatchers) ? fieldMatchers : emptyList())
        .configure(FLUSH_AFTER_WRITE_VALUE, false) // we don't want the object mapper to flush all the time
        .disable(AUTO_CLOSE_TARGET)
        .readAndWrite(input, new BufferedOutputStream(output));
  }

  public  NpmStreamPayload(final InputStreamSupplier supplier);

}