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.Stringcharset-
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 booleancomplete()Returns true if the URL looks well formed and complete.static java.io.InputStreamdecode(java.lang.String s)java.lang.StringgetContentEncoding(java.lang.String userAgent)Returns the content encoding if available.java.lang.StringgetContentType(java.lang.String userAgent)Returns the content type if available.java.lang.StringgetPortStr()Returns the URL up to and include the port number on the host.protected java.io.InputStreamopenStreamInternal(java.lang.String userAgent, java.util.Iterator mimeTypes, java.util.Iterator encodingTypes)java.lang.StringtoString()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:ParsedURLDataReturns 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:
completein classParsedURLData
-
getPortStr
public java.lang.String getPortStr()
Description copied from class:ParsedURLDataReturns the URL up to and include the port number on the host. Does not include the path or fragment pieces.- Overrides:
getPortStrin classParsedURLData
-
toString
public java.lang.String toString()
Description copied from class:ParsedURLDataReturn a string representation of the data.- Overrides:
toStringin 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:
getContentTypein 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:
getContentEncodingin classParsedURLData
-
openStreamInternal
protected java.io.InputStream openStreamInternal(java.lang.String userAgent, java.util.Iterator mimeTypes, java.util.Iterator encodingTypes) throws java.io.IOException- Overrides:
openStreamInternalin classParsedURLData- Throws:
java.io.IOException
-
decode
public static java.io.InputStream decode(java.lang.String s)
-
-