Package com.s3auth.hosts

Examples of com.s3auth.hosts.Resource.lastModified()


                            TimeUnit.MILLISECONDS.toSeconds(
                                System.currentTimeMillis() - start
                            )
                        )
                    );
                    if (resource.lastModified() != null) {
                        response = response.withHeader(
                            HttpHeaders.LAST_MODIFIED,
                            DateUtils.formatDate(resource.lastModified())
                        );
                    }
View Full Code Here


                        )
                    );
                    if (resource.lastModified() != null) {
                        response = response.withHeader(
                            HttpHeaders.LAST_MODIFIED,
                            DateUtils.formatDate(resource.lastModified())
                        );
                    }
                    bytes = response.withBody(resource).send(socket);
                    Logger.info(
                        this, "#run(): %d bytes of %s", bytes, resource
View Full Code Here

        if (request.headers().containsKey(HttpHeaders.IF_MODIFIED_SINCE)) {
            final Date since = DateUtils.parseDate(
                request.headers().get(HttpHeaders.IF_MODIFIED_SINCE)
                    .iterator().next()
            );
            if (resource.lastModified().before(since)) {
                throw new HttpException(HttpURLConnection.HTTP_NOT_MODIFIED);
            }
        }
        if (request.headers().containsKey(HttpHeaders.ACCEPT_ENCODING)
            && request.headers().get(HttpHeaders.ACCEPT_ENCODING)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.