Class Handler
java.lang.Object
java.net.URLStreamHandler
com.github.robtimus.net.protocol.data.Handler
A stream protocol handler for the
data: protocol as specified in RFC 2397.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static CharsetgetCharset(MediaType mediaType) private byte[]private MediaTypegetMediaType(String spec, int start, int indexOfComma) private booleanisBase64Data(String spec, int indexOfComma) protected DataURLConnectionprotected DataURLConnectionopenConnection(URL u, Proxy p) protected voidprivate intvalidateCommaPresent(String spec, int start, int limit) private voidMethods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, sameFile, setURL, setURL, toExternalForm
-
Field Details
-
PROTOCOL
The protocol name.- See Also:
-
BASE64_POSTFIX
- See Also:
-
BASE64_POSTFIX_LENGTH
private static final int BASE64_POSTFIX_LENGTH
-
-
Constructor Details
-
Handler
public Handler()
-
-
Method Details
-
openConnection
- Specified by:
openConnectionin classURLStreamHandler
-
openConnection
- Overrides:
openConnectionin classURLStreamHandler
-
parseURL
- Overrides:
parseURLin classURLStreamHandler
-
validateProtocol
-
validateCommaPresent
-
getMediaType
-
isBase64Data
-
getData
-
getCharset
-