Lines Matching refs:out

200      * @param out The output stream
203 protected void sendStart(OutputStream out) throws IOException {
204 LOG.trace("enter sendStart(OutputStream out)");
205 out.write(EXTRA_BYTES);
206 out.write(getPartBoundary());
207 out.write(CRLF_BYTES);
213 * @param out The output stream
216 protected void sendDispositionHeader(OutputStream out) throws IOException {
217 LOG.trace("enter sendDispositionHeader(OutputStream out)");
218 out.write(CONTENT_DISPOSITION_BYTES);
219 out.write(QUOTE_BYTES);
220 out.write(EncodingUtils.getAsciiBytes(getName()));
221 out.write(QUOTE_BYTES);
226 * @param out The output stream
229 protected void sendContentTypeHeader(OutputStream out) throws IOException {
230 LOG.trace("enter sendContentTypeHeader(OutputStream out)");
233 out.write(CRLF_BYTES);
234 out.write(CONTENT_TYPE_BYTES);
235 out.write(EncodingUtils.getAsciiBytes(contentType));
238 out.write(CHARSET_BYTES);
239 out.write(EncodingUtils.getAsciiBytes(charSet));
248 * @param out The output stream
251 protected void sendTransferEncodingHeader(OutputStream out) throws IOException {
252 LOG.trace("enter sendTransferEncodingHeader(OutputStream out)");
255 out.write(CRLF_BYTES);
256 out.write(CONTENT_TRANSFER_ENCODING_BYTES);
257 out.write(EncodingUtils.getAsciiBytes(transferEncoding));
263 * @param out The output stream
266 protected void sendEndOfHeader(OutputStream out) throws IOException {
267 LOG.trace("enter sendEndOfHeader(OutputStream out)");
268 out.write(CRLF_BYTES);
269 out.write(CRLF_BYTES);
274 * @param out The output stream
277 protected abstract void sendData(OutputStream out) throws IOException;
289 * @param out The output stream
292 protected void sendEnd(OutputStream out) throws IOException {
293 LOG.trace("enter sendEnd(OutputStream out)");
294 out.write(CRLF_BYTES);
302 * @param out The output stream
305 public void send(OutputStream out) throws IOException {
306 LOG.trace("enter send(OutputStream out)");
307 sendStart(out);
308 sendDispositionHeader(out);
309 sendContentTypeHeader(out);
310 sendTransferEncodingHeader(out);
311 sendEndOfHeader(out);
312 sendData(out);
313 sendEnd(out);
353 * @param out The stream to write to.
358 public static void sendParts(OutputStream out, final Part[] parts)
360 sendParts(out, parts, DEFAULT_BOUNDARY_BYTES);
366 * @param out The stream to write to.
374 public static void sendParts(OutputStream out, Part[] parts, byte[] partBoundary)
386 parts[i].send(out);
388 out.write(EXTRA_BYTES);
389 out.write(partBoundary);
390 out.write(EXTRA_BYTES);
391 out.write(CRLF_BYTES);