Java Doc for ParsedURLData.java in  » Graphic-Library » batik » org » apache » batik » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » batik » org.apache.batik.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.batik.util.ParsedURLData

ParsedURLData
public class ParsedURLData (Code)
Holds the data for more URLs.
author:
   Thomas DeWeese
version:
   $Id: ParsedURLData.java 501495 2007-01-30 18:00:36Z dvholten $


Field Summary
final public static  byte[]GZIP_MAGIC
     GZIP header magic number bytes, like found in a gzipped files, which are encoded in Intel format (i.e. little indian).
final protected static  StringHTTP_ACCEPT_ENCODING_HEADER
    
final protected static  StringHTTP_ACCEPT_HEADER
    
final protected static  StringHTTP_ACCEPT_LANGUAGE_HEADER
    
final protected static  StringHTTP_USER_AGENT_HEADER
    
protected static  ListacceptedEncodings
    
public  StringcontentEncoding
    
public  StringcontentType
    
protected  StringcontentTypeCharset
     The extracted charset parameter from the Content-Type header.
protected  StringcontentTypeMediaType
     The extracted type/subtype from the Content-Type header.
public  booleanhasBeenOpened
    
public  Stringhost
    
public  Stringpath
    
public  intport
    
public  Stringprotocol
     Since the Data instance is 'hidden' in the ParsedURL instance we make all our methods public.
public  Stringref
    
public  InputStreamstream
    

Constructor Summary
public  ParsedURLData()
    
public  ParsedURLData(URL url)
     Build from an existing URL.

Method Summary
protected  URLbuildURL()
     Attempts to build a normal java.net.URL instance from this URL.
public static  InputStreamcheckGZIP(InputStream is)
     This is a utility function others can call that checks if is is a GZIP stream if so it returns a GZIPInputStream that will decode the contents, otherwise it returns (or a buffered version of is) untouched.
public  booleancomplete()
     Returns true if the URL looks well formed and complete.
public  booleanequals(Object obj)
     Implement Object.equals for ParsedURLData.
protected  voidextractContentTypeParts(String userAgent)
     Extracts the type/subtype and charset parameter from the Content-Type header.
public  StringgetContentEncoding(String userAgent)
     Returns the content encoding if available.
public  StringgetContentType(String userAgent)
     Returns the content type if available.
public  StringgetContentTypeCharset(String userAgent)
     Returns the content type's charset parameter, if available.
public  StringgetContentTypeMediaType(String userAgent)
     Returns the content type's type/subtype, if available.
public  StringgetPortStr()
     Returns the URL up to and include the port number on the host.
public  booleanhasContentTypeParameter(String userAgent, String param)
     Returns whether the Content-Type header has the given parameter.
public  inthashCode()
     Implement Object.hashCode.
public  InputStreamopenStream(String userAgent, Iterator mimeTypes)
     Open the stream and check for common compression types.
protected  InputStreamopenStreamInternal(String userAgent, Iterator mimeTypes, Iterator encodingTypes)
    
public  InputStreamopenStreamRaw(String userAgent, Iterator mimeTypes)
     Open the stream and returns it.
protected  booleansameFile(ParsedURLData other)
    
public  StringtoString()
     Return a string representation of the data.

Field Detail
GZIP_MAGIC
final public static byte[] GZIP_MAGIC(Code)
GZIP header magic number bytes, like found in a gzipped files, which are encoded in Intel format (i.e. little indian).



HTTP_ACCEPT_ENCODING_HEADER
final protected static String HTTP_ACCEPT_ENCODING_HEADER(Code)



HTTP_ACCEPT_HEADER
final protected static String HTTP_ACCEPT_HEADER(Code)



HTTP_ACCEPT_LANGUAGE_HEADER
final protected static String HTTP_ACCEPT_LANGUAGE_HEADER(Code)



HTTP_USER_AGENT_HEADER
final protected static String HTTP_USER_AGENT_HEADER(Code)



acceptedEncodings
protected static List acceptedEncodings(Code)



contentEncoding
public String contentEncoding(Code)



contentType
public String contentType(Code)



contentTypeCharset
protected String contentTypeCharset(Code)
The extracted charset parameter from the Content-Type header.



contentTypeMediaType
protected String contentTypeMediaType(Code)
The extracted type/subtype from the Content-Type header.



hasBeenOpened
public boolean hasBeenOpened(Code)



host
public String host(Code)



path
public String path(Code)



port
public int port(Code)



protocol
public String protocol(Code)
Since the Data instance is 'hidden' in the ParsedURL instance we make all our methods public. This makes it easy for the various Protocol Handlers to update an instance as parsing proceeds.



ref
public String ref(Code)



stream
public InputStream stream(Code)




Constructor Detail
ParsedURLData
public ParsedURLData()(Code)
Void constructor



ParsedURLData
public ParsedURLData(URL url)(Code)
Build from an existing URL.




Method Detail
buildURL
protected URL buildURL() throws MalformedURLException(Code)
Attempts to build a normal java.net.URL instance from this URL.



checkGZIP
public static InputStream checkGZIP(InputStream is) throws IOException(Code)
This is a utility function others can call that checks if is is a GZIP stream if so it returns a GZIPInputStream that will decode the contents, otherwise it returns (or a buffered version of is) untouched.
Parameters:
  is - Stream that may potentially be a GZIP stream.



complete
public boolean complete()(Code)
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.



equals
public boolean equals(Object obj)(Code)
Implement Object.equals for ParsedURLData.



extractContentTypeParts
protected void extractContentTypeParts(String userAgent)(Code)
Extracts the type/subtype and charset parameter from the Content-Type header.



getContentEncoding
public String getContentEncoding(String userAgent)(Code)
Returns the content encoding if available. This is only available for some protocols.



getContentType
public String getContentType(String userAgent)(Code)
Returns the content type if available. This is only available for some protocols.



getContentTypeCharset
public String getContentTypeCharset(String userAgent)(Code)
Returns the content type's charset parameter, if available. This is only available for some protocols.



getContentTypeMediaType
public String getContentTypeMediaType(String userAgent)(Code)
Returns the content type's type/subtype, if available. This is only available for some protocols.



getPortStr
public String getPortStr()(Code)
Returns the URL up to and include the port number on the host. Does not include the path or fragment pieces.



hasContentTypeParameter
public boolean hasContentTypeParameter(String userAgent, String param)(Code)
Returns whether the Content-Type header has the given parameter.



hashCode
public int hashCode()(Code)
Implement Object.hashCode.



openStream
public InputStream openStream(String userAgent, Iterator mimeTypes) throws IOException(Code)
Open the stream and check for common compression types. If the stream is found to be compressed with a standard compression type it is automatically decompressed.
Parameters:
  userAgent - The user agent opening the stream (may be null).
Parameters:
  mimeTypes - The expected mime types of the contentin the returned InputStream (mapped to Http acceptheader among other possability). The elements ofthe iterator must be strings (may be null)



openStreamInternal
protected InputStream openStreamInternal(String userAgent, Iterator mimeTypes, Iterator encodingTypes) throws IOException(Code)



openStreamRaw
public InputStream openStreamRaw(String userAgent, Iterator mimeTypes) throws IOException(Code)
Open the stream and returns it. No checks are made to see if the stream is compressed or encoded in any way.
Parameters:
  userAgent - The user agent opening the stream (may be null).
Parameters:
  mimeTypes - The expected mime types of the contentin the returned InputStream (mapped to Http acceptheader among other possability). The elements ofthe iterator must be strings (may be null)



sameFile
protected boolean sameFile(ParsedURLData other)(Code)



toString
public String toString()(Code)
Return a string representation of the data.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.