/** * Return the full length of all the data. * If you override this method make sure to override * #send(OutputStream) as well * * @return long The length. * @throws IOException If an IO problem occurs */ public long length() throws IOException { LOG.trace("enter length()"); if (lengthOfData() < 0) { return -1; } ByteArrayOutputStream overhead = new ByteArrayOutputStream(); sendStart(overhead); sendDispositionHeader(overhead); sendContentTypeHeader(overhead); sendTransferEncodingHeader(overhead); sendEndOfHeader(overhead); sendEnd(overhead); return overhead.size() + lengthOfData(); }
/** * Write all the data to the output stream. * If you override this method make sure to override * #length() as well * * @param out The output stream * @throws IOException If an IO problem occurs. */ public void send(OutputStream out) throws IOException { LOG.trace("enter send(OutputStream out)"); sendStart(out); sendDispositionHeader(out); sendContentTypeHeader(out); sendTransferEncodingHeader(out); sendEndOfHeader(out); sendData(out); sendEnd(out); }
/** * Return the full length of all the data. * If you override this method make sure to override * #send(OutputStream) as well * * @return long The length. * @throws IOException If an IO problem occurs */ public long length() throws IOException { LOG.trace("enter length()"); if (lengthOfData() < 0) { return -1; } ByteArrayOutputStream overhead = new ByteArrayOutputStream(); sendStart(overhead); sendDispositionHeader(overhead); sendContentTypeHeader(overhead); sendTransferEncodingHeader(overhead); sendEndOfHeader(overhead); sendEnd(overhead); return overhead.size() + lengthOfData(); }
/** * Write all the data to the output stream. * If you override this method make sure to override * #length() as well * * @param out The output stream * @throws IOException If an IO problem occurs. */ public void send(OutputStream out) throws IOException { LOG.trace("enter send(OutputStream out)"); sendStart(out); sendDispositionHeader(out); sendContentTypeHeader(out); sendTransferEncodingHeader(out); sendEndOfHeader(out); sendData(out); sendEnd(out); }
/** * Return the full length of all the data. * If you override this method make sure to override * #send(OutputStream) as well * * @return long The length. * @throws IOException If an IO problem occurs */ public long length() throws IOException { LOG.trace("enter length()"); if (lengthOfData() < 0) { return -1; } ByteArrayOutputStream overhead = new ByteArrayOutputStream(); sendStart(overhead); sendDispositionHeader(overhead); sendContentTypeHeader(overhead); sendTransferEncodingHeader(overhead); sendEndOfHeader(overhead); sendEnd(overhead); return overhead.size() + lengthOfData(); }
/** * Return the full length of all the data. * If you override this method make sure to override * #send(OutputStream) as well * * @return long The length. * @throws IOException If an IO problem occurs */ public long length() throws IOException { LOG.trace("enter length()"); if (lengthOfData() < 0) { return -1; } ByteArrayOutputStream overhead = new ByteArrayOutputStream(); sendStart(overhead); sendDispositionHeader(overhead); sendContentTypeHeader(overhead); sendTransferEncodingHeader(overhead); sendEndOfHeader(overhead); sendEnd(overhead); return overhead.size() + lengthOfData(); }
/** * Return the full length of all the data. * If you override this method make sure to override * #send(OutputStream) as well * * @return long The length. * @throws IOException If an IO problem occurs */ public long length() throws IOException { LOG.trace("enter length()"); if (lengthOfData() < 0) { return -1; } ByteArrayOutputStream overhead = new ByteArrayOutputStream(); sendStart(overhead); sendDispositionHeader(overhead); sendContentTypeHeader(overhead); sendTransferEncodingHeader(overhead); sendEndOfHeader(overhead); sendEnd(overhead); return overhead.size() + lengthOfData(); }
/** * Write all the data to the output stream. * If you override this method make sure to override * #length() as well * * @param out The output stream * @throws IOException If an IO problem occurs. */ public void send(OutputStream out) throws IOException { LOG.trace("enter send(OutputStream out)"); sendStart(out); sendDispositionHeader(out); sendContentTypeHeader(out); sendTransferEncodingHeader(out); sendEndOfHeader(out); sendData(out); sendEnd(out); }
/** * Write all the data to the output stream. * If you override this method make sure to override * #length() as well * * @param out The output stream * @throws IOException If an IO problem occurs. */ public void send(OutputStream out) throws IOException { LOG.trace("enter send(OutputStream out)"); sendStart(out); sendDispositionHeader(out); sendContentTypeHeader(out); sendTransferEncodingHeader(out); sendEndOfHeader(out); sendData(out); sendEnd(out); }
/** * Write all the data to the output stream. * If you override this method make sure to override * #length() as well * * @param out The output stream * @throws IOException If an IO problem occurs. */ public void send(OutputStream out) throws IOException { LOG.trace("enter send(OutputStream out)"); sendStart(out); sendDispositionHeader(out); sendContentTypeHeader(out); sendTransferEncodingHeader(out); sendEndOfHeader(out); sendData(out); sendEnd(out); }