/** * {@inheritDoc} */ @Override public void writeTo(OutputStream outstream) throws IOException { checkState(!written || isRepeatable(), "can only write to an outputStream once"); written = true; InputStream in = getInput(); try { copy(in, outstream); outstream.flush(); } finally { closeQuietly(in); } }
/** * {@inheritDoc} */ @Override public void writeTo(OutputStream outstream) throws IOException { checkState(!written || isRepeatable(), "can only write to an outputStream once"); written = true; InputStream in = getInput(); try { copy(in, outstream); outstream.flush(); } finally { closeQuietly(in); } }
/** * {@inheritDoc} */ @Override public void writeTo(OutputStream outstream) throws IOException { checkState(!written || isRepeatable(), "can only write to an outputStream once"); written = true; InputStream in = getInput(); try { copy(in, outstream); outstream.flush(); } finally { closeQuietly(in); } }