Examples of lastModifiedTime()


Examples of java.nio.file.attribute.BasicFileAttributes.lastModifiedTime()

                    owner.addString("", counter);
                    group.addString("", counter);
                }

                // show year instead of time when file wasn't changed in actual year
                Date lastModifiedTime = new Date(attr.lastModifiedTime().toMillis());

                Calendar lastModifiedCalendar = Calendar.getInstance();
                lastModifiedCalendar.setTime(lastModifiedTime);

                Calendar nowCalendar = Calendar.getInstance();
View Full Code Here

Examples of java.nio.file.attribute.PosixFileAttributes.lastModifiedTime()

            file_type = FT_DEVICE;
          }
         
            file_access_time = attrs.lastAccessTime().to(TimeUnit.SECONDS);
            file_create_time = attrs.creationTime().to(TimeUnit.SECONDS);
            file_modify_time = attrs.lastModifiedTime().to(TimeUnit.SECONDS);

            file_access = 0;
            if (Files.isReadable(path)) file_access |= FILE_ACCESS_READ;
            if (Files.isWritable(path)) file_access |= FILE_ACCESS_WRITE;
View Full Code Here

Examples of org.apache.wicket.core.util.resource.UrlResourceStream.lastModifiedTime()

  public void lastModifiedForResourceInJar() throws IOException {
    String anyClassInJarFile = "/java/lang/String.class";
    URL url = getClass().getResource(anyClassInJarFile);
    UrlResourceStream stream = new UrlResourceStream(url);
    Bytes length = stream.length();
    stream.lastModifiedTime();
    assertEquals(stream.length(), length);
    stream.close();
  }

  /**
 
View Full Code Here

Examples of org.apache.wicket.core.util.resource.WebExternalResourceStream.lastModifiedTime()

    if (resourceResponse.dataNeedsToBeWritten(attributes))
    {
      final WebExternalResourceStream webExternalResourceStream =
        new WebExternalResourceStream(path);
      resourceResponse.setContentType(webExternalResourceStream.getContentType());
      resourceResponse.setLastModified(webExternalResourceStream.lastModifiedTime());
      resourceResponse.setFileName(path);
      resourceResponse.setWriteCallback(new WriteCallback()
      {
        @Override
        public void writeData(final Attributes attributes)
View Full Code Here

Examples of org.apache.wicket.core.util.resource.WebExternalResourceStream.lastModifiedTime()

    final ResourceResponse resourceResponse = new ResourceResponse();

    final WebExternalResourceStream webExternalResourceStream =
      new WebExternalResourceStream(path);
    resourceResponse.setContentType(webExternalResourceStream.getContentType());
    resourceResponse.setLastModified(webExternalResourceStream.lastModifiedTime());
    resourceResponse.setFileName(path);
    resourceResponse.setWriteCallback(new WriteCallback()
    {
      @Override
      public void writeData(final Attributes attributes) throws IOException
View Full Code Here

Examples of org.apache.wicket.util.resource.IResourceStream.lastModifiedTime()

  @Override
  protected ResourceResponse newResourceResponse(Attributes attributes)
  {
    final IResourceStream resourceStream = internalGetResourceStream();
    ResourceResponse data = new ResourceResponse();
    Time lastModifiedTime = resourceStream.lastModifiedTime();
    if (lastModifiedTime != null)
    {
      data.setLastModified(lastModifiedTime);
    }
View Full Code Here

Examples of org.apache.wicket.util.resource.IResourceStream.lastModifiedTime()

      return sendResourceError(resourceResponse, HttpServletResponse.SC_NOT_FOUND,
          "Unable to find resource");
    }

    // add Last-Modified header (to support HEAD requests and If-Modified-Since)
    final Time lastModified = resourceStream.lastModifiedTime();

    resourceResponse.setLastModified(lastModified);

    if (resourceResponse.dataNeedsToBeWritten(attributes))
    {
View Full Code Here

Examples of org.apache.wicket.util.resource.IResourceStream.lastModifiedTime()

      return sendResourceError(resourceResponse, HttpServletResponse.SC_NOT_FOUND,
          "Unable to find resource");
    }

    // add Last-Modified header (to support HEAD requests and If-Modified-Since)
    final Time lastModified = resourceStream.lastModifiedTime();

    resourceResponse.setLastModified(lastModified);

    if (resourceResponse.dataNeedsToBeWritten(attributes))
    {
View Full Code Here

Examples of org.apache.wicket.util.resource.IResourceStream.lastModifiedTime()

    if (stream == null)
    {
      return null;
    }

    final Time lastModified = stream.lastModifiedTime();

    // if no timestamp is available we can not provide a version
    if (lastModified == null)
    {
      return null;
View Full Code Here

Examples of org.apache.wicket.util.resource.IResourceStream.lastModifiedTime()

      {
        throw new IllegalArgumentException("resource " + fileName + " not found for scope " +
          scope + " (path = " + path + ")");
      }

      setLastModified(stream.lastModifiedTime());

      try
      {
        if (encoding != null)
        {
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.