use of org.apache.wicket.util.lang.Bytes 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();
}
use of org.apache.wicket.util.lang.Bytes in project wicket by apache.
the class DefaultPageManagerProvider method newDataStore.
protected IDataStore newDataStore() {
StoreSettings storeSettings = getStoreSettings();
Bytes maxSizePerSession = storeSettings.getMaxSizePerSession();
File fileStoreFolder = storeSettings.getFileStoreFolder();
return new DiskDataStore(application.getName(), fileStoreFolder, maxSizePerSession);
}
Aggregations