@@ -117,13 +117,13 @@ public class FileDownloaderCache {
117117 }
118118 }
119119
120- static Optional <FileCached > getFileCached (final URL remoteURL )
120+ public static Optional <FileCached > getFileCached (final URL remoteURL )
121121 throws URISyntaxException , NoSuchMethodException , ScriptException ,
122122 IOException {
123123 return getFileCached (remoteURL , true );
124124 }
125125
126- static Optional <FileCached > getFileCached (final URL remoteURL , boolean enableCache )
126+ public static Optional <FileCached > getFileCached (final URL remoteURL , boolean enableCache )
127127 throws URISyntaxException , NoSuchMethodException , ScriptException ,
128128 IOException {
129129 // Return always and empty file if the cache is not enable
@@ -305,15 +305,15 @@ public boolean exists() {
305305 }
306306
307307 @ JsonIgnore
308- Optional <File > getFileFromCache () {
308+ public Optional <File > getFileFromCache () {
309309 if (md5Check ()) {
310310 return Optional .of (Paths .get (localPath ).toFile ());
311311 }
312312 return Optional .empty ();
313313
314314 }
315315
316- synchronized void updateCacheFile (File fileToCache ) throws Exception {
316+ public synchronized void updateCacheFile (File fileToCache ) throws Exception {
317317 Path cacheFilePath = Paths .get (localPath );
318318
319319 // If the cache directory does not exist create it
@@ -343,7 +343,7 @@ synchronized void updateCacheFile(File fileToCache) throws Exception {
343343
344344 }
345345
346- synchronized void invalidateCache () throws IOException {
346+ public synchronized void invalidateCache () throws IOException {
347347 cachedFiles .remove (remoteURL );
348348 Files .deleteIfExists (Paths .get (localPath ));
349349 }
@@ -356,7 +356,7 @@ private String calculateMD5() throws IOException, NoSuchAlgorithmException {
356356 }
357357
358358 @ JsonIgnore
359- boolean md5Check () {
359+ public boolean md5Check () {
360360 try {
361361 return !Objects .isNull (getMD5 ()) && Objects .equals (calculateMD5 (), getMD5 ());
362362 } catch (Exception e ) {
@@ -366,7 +366,7 @@ boolean md5Check() {
366366 }
367367
368368 @ JsonIgnore
369- LocalDateTime getExpiresTime () {
369+ public LocalDateTime getExpiresTime () {
370370 final int maxAge ;
371371 if (cacheControl != null ) {
372372 maxAge = cacheControl .getMaxAge ();
0 commit comments