Package com.mku.salmonfs.handler
Class AesStreamHandler
- java.lang.Object
-
- java.net.URLStreamHandler
-
- com.mku.salmonfs.handler.AesStreamHandler
-
public class AesStreamHandler extends java.net.URLStreamHandler
Provides a local stream URL handler to read anAesFile
as a source. This works with 3rd party libraries and apps that can read file only via URLs.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AesStreamHandler
getInstance()
Get the instance.protected java.net.URLConnection
openConnection(java.net.URL u)
Open a local connection to an encrypted stream.void
register(java.lang.String path, IVirtualFile file)
Register a path to be handled by this handler.void
unregister(java.lang.String path)
Unregister a path.
-
-
-
Method Detail
-
getInstance
public static AesStreamHandler getInstance()
Get the instance.- Returns:
- A URL stream handler for encrypted streams.
-
register
public void register(java.lang.String path, IVirtualFile file)
Register a path to be handled by this handler.- Parameters:
path
- The URL pathfile
- The file associated with this path.
-
unregister
public void unregister(java.lang.String path)
Unregister a path.- Parameters:
path
- The URL path
-
openConnection
protected java.net.URLConnection openConnection(java.net.URL u)
Open a local connection to an encrypted stream.- Specified by:
openConnection
in classjava.net.URLStreamHandler
- Parameters:
u
- the URL that this connects to.- Returns:
- URLConnection to inject the decoded stream
-
-