use of org.apache.wicket.core.util.resource.UrlResourceStream in project wicket by apache.
the class UrlResourceStreamTest method lastModifiedForResourceInJar.
/**
* lastModified() shouldn't change the content length if the file isn't really changed.
*
* @throws IOException
*/
@Test
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();
}
Aggregations