Java Doc for InputSource.java in  » IDE-Netbeans » visualweb.api.designer » org » w3c » css » sac » 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 » IDE Netbeans » visualweb.api.designer » org.w3c.css.sac 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.w3c.css.sac.InputSource

InputSource
public class InputSource (Code)
A single input source for a CSS source.

This class allows a CSS application to encapsulate information about an input source in a single object, which may include a URI, a byte stream (possibly with a specified encoding), and/or a character stream.

The CSS parser will use the InputSource object to determine how to read CSS input. If there is a character stream available, the parser will read that stream directly; if not, the parser will use a byte stream, if available; if neither a character stream nor a byte stream is available, the parser will attempt to open a URI connection to the resource identified by the URI.

An InputSource object belongs to the application: the CSS parser shall never modify it in any way (it may modify a copy if necessary).


version:
   $Revision$
author:
   Philippe Le Hegaret



Constructor Summary
public  InputSource()
     Zero-argument default constructor.
public  InputSource(String uri)
     Create a new input source with a URI.
public  InputSource(Reader characterStream)
     Create a new input source with a character stream.

Method Summary
public  InputStreamgetByteStream()
     Get the byte stream for this input source.
public  ReadergetCharacterStream()
     Get the character stream for this input source.
public  StringgetEncoding()
     Get the character encoding for a byte stream or URI.
public  StringgetMedia()
     Returns the media associated to the input source or null if media are currently unknown.
public  StringgetTitle()
     Returns the title for this input source.
public  StringgetURI()
     Get the URI for this input source.
public  voidsetByteStream(InputStream byteStream)
     Set the byte stream for this input source.
public  voidsetCharacterStream(Reader characterStream)
     Set the character stream for this input source.
public  voidsetEncoding(String encoding)
     Set the character encoding, if known.
public  voidsetMedia(String media)
     Set the media for this input source.
public  voidsetTitle(String title)
     Set the title for this input source.
Parameters:
  title - The advisory title.
public  voidsetURI(String uri)
     Set the URI for this input source.


Constructor Detail
InputSource
public InputSource()(Code)
Zero-argument default constructor.
See Also:   InputSource.setURI
See Also:   InputSource.setByteStream
See Also:   InputSource.setCharacterStream
See Also:   InputSource.setEncoding



InputSource
public InputSource(String uri)(Code)
Create a new input source with a URI.

The URI must be full resolved.


Parameters:
  uri - The URI.
See Also:   InputSource.setURI
See Also:   InputSource.setByteStream
See Also:   InputSource.setEncoding
See Also:   InputSource.setCharacterStream



InputSource
public InputSource(Reader characterStream)(Code)
Create a new input source with a character stream.

Application writers may use setURI() to provide a base for resolving relative URIs, and setPublicId to include a public identifier.

The character stream shall not include a byte order mark.


See Also:   InputSource.setURI
See Also:   InputSource.setByteStream
See Also:   InputSource.setCharacterStream




Method Detail
getByteStream
public InputStream getByteStream()(Code)
Get the byte stream for this input source.

The getEncoding method will return the character encoding for this byte stream, or null if unknown.

The byte stream, or null if none was supplied.
See Also:   InputSource.getEncoding
See Also:   InputSource.setByteStream



getCharacterStream
public Reader getCharacterStream()(Code)
Get the character stream for this input source. The character stream, or null if none was supplied.
See Also:   InputSource.setCharacterStream



getEncoding
public String getEncoding()(Code)
Get the character encoding for a byte stream or URI. The encoding, or null if none was supplied.
See Also:   InputSource.setByteStream
See Also:   InputSource.getURI
See Also:   InputSource.getByteStream



getMedia
public String getMedia()(Code)
Returns the media associated to the input source or null if media are currently unknown. the media associated to this input source.



getTitle
public String getTitle()(Code)
Returns the title for this input source.



getURI
public String getURI()(Code)
Get the URI for this input source.

The getEncoding method will return the character encoding of the object pointed to, or null if unknown.

The URI will be fully resolved.

The URI.
See Also:   InputSource.setURI
See Also:   InputSource.getEncoding



setByteStream
public void setByteStream(InputStream byteStream)(Code)
Set the byte stream for this input source.

The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself.

If the application knows the character encoding of the byte stream, it should set it with the setEncoding method.


Parameters:
  byteStream - A byte stream containing an CSS document orother entity.
See Also:   InputSource.setEncoding
See Also:   InputSource.getByteStream
See Also:   InputSource.getEncoding



setCharacterStream
public void setCharacterStream(Reader characterStream)(Code)
Set the character stream for this input source.

If there is a character stream specified, the SAX parser will ignore any byte stream and will not attempt to open a URI connection to the URI.


Parameters:
  characterStream - The character stream containing theCSS document or other entity.
See Also:   InputSource.getCharacterStream



setEncoding
public void setEncoding(String encoding)(Code)
Set the character encoding, if known.

The encoding must be a string acceptable for an CHARSET encoding declaration (see section 4.4 of the CSS recommendation Level 2).

This method has no effect when the application provides a character stream.


Parameters:
  encoding - A string describing the character encoding.
See Also:   InputSource.setURI
See Also:   InputSource.setByteStream
See Also:   InputSource.getEncoding



setMedia
public void setMedia(String media)(Code)
Set the media for this input source.
Parameters:
  media - A comma separated list with all media.



setTitle
public void setTitle(String title)(Code)
Set the title for this input source.
Parameters:
  title - The advisory title. See the title attribute definitionfor the LINKelement in HTML 4.0, and the title pseudo-attribute for the XMLstyle sheet processing instruction.



setURI
public void setURI(String uri)(Code)
Set the URI for this input source.

The URI is optional if there is a byte stream or a character stream, but it is still useful to provide one, since the application can use it to resolve relative URIs and can include it in error messages and warnings (the parser will attempt to open a connection to the URI only if there is no byte stream or character stream specified).

If the application knows the character encoding of the object pointed to by the URI, it can register the encoding using the setEncoding method.

The URI must be fully resolved.


Parameters:
  uri - The URI as a string.
See Also:   InputSource.setEncoding
See Also:   InputSource.getURI
See Also:   Locator.getURI
See Also:   CSSParseException.getURI
See Also:   



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.