/** * {@inheritDoc} */ @Override public void addDateHeader(String name, long date) { if (isCommitted()) return; response.addDateHeader(name, date); }
protected static void addCachingHeaders(final Response response, final File file) { final StringBuilder sb = new StringBuilder(); final long fileLength = file.length(); final long lastModified = file.lastModified(); if ((fileLength >= 0) || (lastModified >= 0)) { sb.append('"').append(fileLength).append('-'). append(lastModified).append('"'); response.setHeader(Header.ETag, sb.toString()); } response.addDateHeader(Header.LastModified, lastModified); }
protected static void addCachingHeaders(final Response response, final File file) { final StringBuilder sb = new StringBuilder(); final long fileLength = file.length(); final long lastModified = file.lastModified(); if ((fileLength >= 0) || (lastModified >= 0)) { sb.append('"').append(fileLength).append('-'). append(lastModified).append('"'); response.setHeader(Header.ETag, sb.toString()); } response.addDateHeader(Header.LastModified, lastModified); }
protected static void addCachingHeaders(final Response response, final File file) { final StringBuilder sb = new StringBuilder(); final long fileLength = file.length(); final long lastModified = file.lastModified(); if ((fileLength >= 0) || (lastModified >= 0)) { sb.append('"').append(fileLength).append('-'). append(lastModified).append('"'); response.setHeader(Header.ETag, sb.toString()); } response.addDateHeader(Header.LastModified, lastModified); }
/** * {@inheritDoc} */ @Override public void addDateHeader(String name, long date) { if (isCommitted()) return; response.addDateHeader(name, date); }
protected static void addCachingHeaders(final Response response, final File file) { final StringBuilder sb = new StringBuilder(); final long fileLength = file.length(); final long lastModified = file.lastModified(); if ((fileLength >= 0) || (lastModified >= 0)) { sb.append('"').append(fileLength).append('-'). append(lastModified).append('"'); response.setHeader(Header.ETag, sb.toString()); } response.addDateHeader(Header.LastModified, lastModified); }
protected static void addCachingHeaders(final Response response, final File file) { final StringBuilder sb = new StringBuilder(); final long fileLength = file.length(); final long lastModified = file.lastModified(); if ((fileLength >= 0) || (lastModified >= 0)) { sb.append('"').append(fileLength).append('-'). append(lastModified).append('"'); response.setHeader(Header.ETag, sb.toString()); } response.addDateHeader(Header.LastModified, lastModified); }
protected static void addCachingHeaders(final Response response, final File file) { final StringBuilder sb = new StringBuilder(); final long fileLength = file.length(); final long lastModified = file.lastModified(); if ((fileLength >= 0) || (lastModified >= 0)) { sb.append('"').append(fileLength).append('-'). append(lastModified).append('"'); response.setHeader(Header.ETag, sb.toString()); } response.addDateHeader(Header.LastModified, lastModified); }
/** * {@inheritDoc} */ @Override public void addDateHeader(String name, long date) { if (isCommitted()) return; response.addDateHeader(name, date); }
/** * {@inheritDoc} */ @Override public void addDateHeader(String name, long date) { if (isCommitted()) return; response.addDateHeader(name, date); }
/** * {@inheritDoc} */ @Override public void addDateHeader(String name, long date) { if (isCommitted()) return; response.addDateHeader(name, date); }
protected static void addCachingHeaders(final Response response, final File file) { final StringBuilder sb = new StringBuilder(); final long fileLength = file.length(); final long lastModified = file.lastModified(); if ((fileLength >= 0) || (lastModified >= 0)) { sb.append('"').append(fileLength).append('-'). append(lastModified).append('"'); response.setHeader(Header.ETag, sb.toString()); } response.addDateHeader(Header.LastModified, lastModified); }
private static void sendResource(final Response response, final InputStream input) throws IOException { response.setStatus(HttpStatus.OK_200); response.addDateHeader(Header.Date, System.currentTimeMillis()); final int chunkSize = 8192; response.suspend(); final NIOOutputStream outputStream = response.getNIOOutputStream(); outputStream.notifyCanWrite( new NonBlockingDownloadHandler(response, outputStream, input, chunkSize)); }
private static void sendResource(final Response response, final InputStream input) throws IOException { response.setStatus(HttpStatus.OK_200); response.addDateHeader(Header.Date, System.currentTimeMillis()); final int chunkSize = 8192; response.suspend(); final NIOOutputStream outputStream = response.getNIOOutputStream(); outputStream.notifyCanWrite( new NonBlockingDownloadHandler(response, outputStream, input, chunkSize)); }
private static void sendResource(final Response response, final InputStream input) throws IOException { response.setStatus(HttpStatus.OK_200); response.addDateHeader(Header.Date, System.currentTimeMillis()); final int chunkSize = 8192; response.suspend(); final NIOOutputStream outputStream = response.getNIOOutputStream(); outputStream.notifyCanWrite( new NonBlockingDownloadHandler(response, outputStream, input, chunkSize)); }
private static void sendResource(final Response response, final InputStream input) throws IOException { response.setStatus(HttpStatus.OK_200); response.addDateHeader(Header.Date, System.currentTimeMillis()); final int chunkSize = 8192; response.suspend(); final NIOOutputStream outputStream = response.getNIOOutputStream(); outputStream.notifyCanWrite( new NonBlockingDownloadHandler(response, outputStream, input, chunkSize)); }
private static void sendResource(final Response response, final InputStream input) throws IOException { response.setStatus(HttpStatus.OK_200); response.addDateHeader(Header.Date, System.currentTimeMillis()); final int chunkSize = 8192; response.suspend(); final NIOOutputStream outputStream = response.getNIOOutputStream(); outputStream.notifyCanWrite( new NonBlockingDownloadHandler(response, outputStream, input, chunkSize)); }
private static void sendResource(final Response response, final InputStream input) throws IOException { response.setStatus(HttpStatus.OK_200); response.addDateHeader(Header.Date, System.currentTimeMillis()); final int chunkSize = 8192; response.suspend(); final NIOOutputStream outputStream = response.getNIOOutputStream(); outputStream.notifyCanWrite( new NonBlockingDownloadHandler(response, outputStream, input, chunkSize)); }
private static void sendResource(final Response response, final InputStream input) throws IOException { response.setStatus(HttpStatus.OK_200); response.addDateHeader(Header.Date, System.currentTimeMillis()); final int chunkSize = 8192; response.suspend(); final NIOOutputStream outputStream = response.getNIOOutputStream(); outputStream.notifyCanWrite( new NonBlockingDownloadHandler(response, outputStream, input, chunkSize)); }
private static void sendResource(final Response response, final InputStream input) throws IOException { response.setStatus(HttpStatus.OK_200); response.addDateHeader(Header.Date, System.currentTimeMillis()); final int chunkSize = 8192; response.suspend(); final NIOOutputStream outputStream = response.getNIOOutputStream(); outputStream.notifyCanWrite( new NonBlockingDownloadHandler(response, outputStream, input, chunkSize)); }