Package play.vfs

Examples of play.vfs.VirtualFile.lastModified()


                            copyStream(grizzlyResponse, file.inputstream());
                        } else {
                            copyStream(grizzlyResponse, new ByteArrayInputStream(new byte[0]));
                        }
                    } else {
                        long last = file.lastModified();
                        String etag = "\"" + last + "-" + file.hashCode() + "\"";
                        if (!isModified(etag, last, grizzlyRequest)) {
                            grizzlyResponse.setHeader("Etag", etag);
                            grizzlyResponse.setStatus(304);
                        } else {
View Full Code Here


                        copyStream(servletResponse, file.inputstream());
                    } else {
                        copyStream(servletResponse, new ByteArrayInputStream(new byte[0]));
                    }
                } else {
                    long last = file.lastModified();
                    String etag = "\"" + last + "-" + file.hashCode() + "\"";
                    if (!isModified(etag, last, servletRequest)) {
                        servletResponse.setHeader("Etag", etag);
                        servletResponse.setStatus(304);
                    } else {
View Full Code Here

                        copyStream(servletResponse, file.inputstream());
                    } else {
                        copyStream(servletResponse, new ByteArrayInputStream(new byte[0]));
                    }
                } else {
                    long last = file.lastModified();
                    String etag = "\"" + last + "-" + file.hashCode() + "\"";
                    if (!isModified(etag, last, servletRequest)) {
                        servletResponse.setHeader("Etag", etag);
                        servletResponse.setStatus(304);
                    } else {
View Full Code Here

    @Override
    public void detectChange() {
        VirtualFile vf = Play.getVirtualFile("conf/messages");
        if (vf != null && vf.exists() && !vf.isDirectory()
                && vf.lastModified() > lastLoading) {
            onApplicationStart();
            return;
        }
        for (VirtualFile module : Play.modules.values()) {
            vf = module.child("conf/messages");
View Full Code Here

            return;
        }
        for (VirtualFile module : Play.modules.values()) {
            vf = module.child("conf/messages");
            if (vf != null && vf.exists() && !vf.isDirectory()
                    && vf.lastModified() > lastLoading) {
                onApplicationStart();
                return;
            }
        }
        for (String locale : Play.langs) {
View Full Code Here

            }
        }
        for (String locale : Play.langs) {
            vf = Play.getVirtualFile("conf/messages." + locale);
            if (vf != null && vf.exists() && !vf.isDirectory()
                    && vf.lastModified() > lastLoading) {
                onApplicationStart();
                return;
            }
            for (VirtualFile module : Play.modules.values()) {
                vf = module.child("conf/messages." + locale);
View Full Code Here

                return;
            }
            for (VirtualFile module : Play.modules.values()) {
                vf = module.child("conf/messages." + locale);
                if (vf != null && vf.exists() && !vf.isDirectory()
                        && vf.lastModified() > lastLoading) {
                    onApplicationStart();
                    return;
                }
            }
        }
View Full Code Here

                        copyStream(servletResponse, file.inputstream());
                    } else {
                        copyStream(servletResponse, new ByteArrayInputStream(new byte[0]));
                    }
                } else {
                    long last = file.lastModified();
                    String etag = "\"" + last + "-" + file.hashCode() + "\"";
                    String lastDate = Utils.getHttpDateFormatter().format(new Date(last));
                    if (!isModified(etag, lastDate, servletRequest)) {
                        servletResponse.setHeader("Etag", etag);
                        servletResponse.setStatus(304);
View Full Code Here

                            copyStream(grizzlyResponse, file.inputstream());
                        } else {
                            copyStream(grizzlyResponse, new ByteArrayInputStream(new byte[0]));
                        }
                    } else {
                        long last = file.lastModified();
                        String etag = "\"" + last + "-" + file.hashCode() + "\"";
                        if (!isModified(etag, last, grizzlyRequest)) {
                            grizzlyResponse.setHeader("Etag", etag);
                            grizzlyResponse.setStatus(304);
                        } else {
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.