Package org.apache.batik.util
Class ParsedURLDataProtocolHandler.DataParsedURLData
- java.lang.Object
-
- org.apache.batik.util.ParsedURLData
-
- org.apache.batik.util.ParsedURLDataProtocolHandler.DataParsedURLData
-
- Enclosing class:
- ParsedURLDataProtocolHandler
static class ParsedURLDataProtocolHandler.DataParsedURLData extends ParsedURLData
Overrides some of the methods to support data protocol weirdness
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
charset
-
Fields inherited from class org.apache.batik.util.ParsedURLData
acceptedEncodings, contentEncoding, contentType, contentTypeCharset, contentTypeMediaType, GZIP_MAGIC, hasBeenOpened, host, HTTP_ACCEPT_ENCODING_HEADER, HTTP_ACCEPT_HEADER, HTTP_ACCEPT_LANGUAGE_HEADER, HTTP_USER_AGENT_HEADER, path, port, postConnectionURL, protocol, ref, stream
-
-
Constructor Summary
Constructors Constructor Description DataParsedURLData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
complete()
Returns true if the URL looks well formed and complete.static java.io.InputStream
decode(java.lang.String s)
java.lang.String
getContentEncoding(java.lang.String userAgent)
Returns the content encoding if available.java.lang.String
getContentType(java.lang.String userAgent)
Returns the content type if available.java.lang.String
getPortStr()
Returns the URL up to and include the port number on the host.protected java.io.InputStream
openStreamInternal(java.lang.String userAgent, java.util.Iterator mimeTypes, java.util.Iterator encodingTypes)
java.lang.String
toString()
Return a string representation of the data.-
Methods inherited from class org.apache.batik.util.ParsedURLData
buildURL, checkGZIP, equals, extractContentTypeParts, getContentTypeCharset, getContentTypeMediaType, getPostConnectionURL, hasContentTypeParameter, hashCode, openStream, openStreamRaw, sameFile
-
-
-
-
Method Detail
-
complete
public boolean complete()
Description copied from class:ParsedURLData
Returns true if the URL looks well formed and complete. This does not garuntee that the stream can be opened but is a good indication that things aren't totally messed up.- Overrides:
complete
in classParsedURLData
-
getPortStr
public java.lang.String getPortStr()
Description copied from class:ParsedURLData
Returns the URL up to and include the port number on the host. Does not include the path or fragment pieces.- Overrides:
getPortStr
in classParsedURLData
-
toString
public java.lang.String toString()
Description copied from class:ParsedURLData
Return a string representation of the data.- Overrides:
toString
in classParsedURLData
-
getContentType
public java.lang.String getContentType(java.lang.String userAgent)
Returns the content type if available. This is only available for some protocols.- Overrides:
getContentType
in classParsedURLData
-
getContentEncoding
public java.lang.String getContentEncoding(java.lang.String userAgent)
Returns the content encoding if available. This is only available for some protocols.- Overrides:
getContentEncoding
in classParsedURLData
-
openStreamInternal
protected java.io.InputStream openStreamInternal(java.lang.String userAgent, java.util.Iterator mimeTypes, java.util.Iterator encodingTypes) throws java.io.IOException
- Overrides:
openStreamInternal
in classParsedURLData
- Throws:
java.io.IOException
-
decode
public static java.io.InputStream decode(java.lang.String s)
-
-