/** * Set the content length (in bytes) for this Response. * * If the <code>length</code> argument is negative - then {@link org.glassfish.grizzly.http.HttpPacket} * content-length value will be reset to <tt>-1</tt> and * <tt>Content-Length</tt> header (if present) will be removed. * * @param length The new content length */ public void setContentLengthLong(final long length) { checkResponse(); if (isCommitted()) return; if (usingWriter) return; response.setContentLengthLong(length); }
/** * Set the content length (in bytes) for this Response. * * If the <code>length</code> argument is negative - then {@link org.glassfish.grizzly.http.HttpPacket} * content-length value will be reset to <tt>-1</tt> and * <tt>Content-Length</tt> header (if present) will be removed. * * @param length The new content length */ public void setContentLengthLong(final long length) { checkResponse(); if (isCommitted()) return; if (usingWriter) return; response.setContentLengthLong(length); }
/** * Set the content length (in bytes) for this Response. * * If the <code>length</code> argument is negative - then {@link org.glassfish.grizzly.http.HttpPacket} * content-length value will be reset to <tt>-1</tt> and * <tt>Content-Length</tt> header (if present) will be removed. * * @param length The new content length */ public void setContentLengthLong(final long length) { checkResponse(); if (isCommitted()) return; if (usingWriter) return; response.setContentLengthLong(length); }
/** * Set the content length (in bytes) for this Response. * * If the <code>length</code> argument is negative - then {@link org.glassfish.grizzly.http.HttpPacket} * content-length value will be reset to <tt>-1</tt> and * <tt>Content-Length</tt> header (if present) will be removed. * * @param length The new content length */ public void setContentLengthLong(final long length) { checkResponse(); if (isCommitted()) return; if (usingWriter) return; response.setContentLengthLong(length); }
/** * Set the content length (in bytes) for this Response. * * If the <code>length</code> argument is negative - then {@link org.glassfish.grizzly.http.HttpPacket} * content-length value will be reset to <tt>-1</tt> and * <tt>Content-Length</tt> header (if present) will be removed. * * @param length The new content length */ public void setContentLengthLong(final long length) { checkResponse(); if (isCommitted()) return; if (usingWriter) return; response.setContentLengthLong(length); }
/** * Set the content length (in bytes) for this Response. * * If the <code>length</code> argument is negative - then {@link org.glassfish.grizzly.http.HttpPacket} * content-length value will be reset to <tt>-1</tt> and * <tt>Content-Length</tt> header (if present) will be removed. * * @param length The new content length */ public void setContentLengthLong(final long length) { checkResponse(); if (isCommitted()) return; if (usingWriter) return; response.setContentLengthLong(length); }
/** * Set the content length (in bytes) for this Response. * * If the <code>length</code> argument is negative - then {@link org.glassfish.grizzly.http.HttpPacket} * content-length value will be reset to <tt>-1</tt> and * <tt>Content-Length</tt> header (if present) will be removed. * * @param length The new content length */ public void setContentLengthLong(final long length) { checkResponse(); if (isCommitted()) return; if (usingWriter) return; response.setContentLengthLong(length); }
/** * Set the content length (in bytes) for this Response. * * If the <code>length</code> argument is negative - then {@link org.glassfish.grizzly.http.HttpPacket} * content-length value will be reset to <tt>-1</tt> and * <tt>Content-Length</tt> header (if present) will be removed. * * @param length The new content length */ public void setContentLengthLong(final long length) { checkResponse(); if (isCommitted()) return; if (usingWriter) return; response.setContentLengthLong(length); }
/** * Set the content length (in bytes) for this Response. * * If the <code>length</code> argument is negative - then {@link org.glassfish.grizzly.http.HttpPacket} * content-length value will be reset to <tt>-1</tt> and * <tt>Content-Length</tt> header (if present) will be removed. * * @param length The new content length */ public void setContentLengthLong(final long length) { checkResponse(); if (isCommitted()) return; if (usingWriter) return; response.setContentLengthLong(length); }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }