Source Code Cross Referenced for StreamInFactory.java in  » HTML-Parser » JTidy » org » w3c » tidy » 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 » HTML Parser » JTidy » org.w3c.tidy 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*
02:         *  Java HTML Tidy - JTidy
03:         *  HTML parser and pretty printer
04:         *
05:         *  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
06:         *  Institute of Technology, Institut National de Recherche en
07:         *  Informatique et en Automatique, Keio University). All Rights
08:         *  Reserved.
09:         *
10:         *  Contributing Author(s):
11:         *
12:         *     Dave Raggett <dsr@w3.org>
13:         *     Andy Quick <ac.quick@sympatico.ca> (translation to Java)
14:         *     Gary L Peskin <garyp@firstech.com> (Java development)
15:         *     Sami Lempinen <sami@lempinen.net> (release management)
16:         *     Fabrizio Giustina <fgiust at users.sourceforge.net>
17:         *
18:         *  The contributing author(s) would like to thank all those who
19:         *  helped with testing, bug fixes, and patience.  This wouldn't
20:         *  have been possible without all of you.
21:         *
22:         *  COPYRIGHT NOTICE:
23:         * 
24:         *  This software and documentation is provided "as is," and
25:         *  the copyright holders and contributing author(s) make no
26:         *  representations or warranties, express or implied, including
27:         *  but not limited to, warranties of merchantability or fitness
28:         *  for any particular purpose or that the use of the software or
29:         *  documentation will not infringe any third party patents,
30:         *  copyrights, trademarks or other rights. 
31:         *
32:         *  The copyright holders and contributing author(s) will not be
33:         *  liable for any direct, indirect, special or consequential damages
34:         *  arising out of any use of the software or documentation, even if
35:         *  advised of the possibility of such damage.
36:         *
37:         *  Permission is hereby granted to use, copy, modify, and distribute
38:         *  this source code, or portions hereof, documentation and executables,
39:         *  for any purpose, without fee, subject to the following restrictions:
40:         *
41:         *  1. The origin of this source code must not be misrepresented.
42:         *  2. Altered versions must be plainly marked as such and must
43:         *     not be misrepresented as being the original source.
44:         *  3. This Copyright notice may not be removed or altered from any
45:         *     source or altered source distribution.
46:         * 
47:         *  The copyright holders and contributing author(s) specifically
48:         *  permit, without fee, and encourage the use of this source code
49:         *  as a component for supporting the Hypertext Markup Language in
50:         *  commercial products. If you use this source code in a product,
51:         *  acknowledgment is not required but would be appreciated.
52:         *
53:         */
54:        package org.w3c.tidy;
55:
56:        import java.io.InputStream;
57:        import java.io.UnsupportedEncodingException;
58:
59:        /**
60:         * Tidy Input factory.
61:         * @author Fabrizio Giustina
62:         * @version $Revision: 1.3 $ ($Author: fgiust $)
63:         */
64:        public final class StreamInFactory {
65:
66:            /**
67:             * Don't instantiate.
68:             */
69:            private StreamInFactory() {
70:                // unused
71:            }
72:
73:            /**
74:             * Returns the appropriate StreamIn implementation.
75:             * @param config configuration instance
76:             * @param stream input stream
77:             * @return StreamIn instance
78:             */
79:            public static StreamIn getStreamIn(Configuration config,
80:                    InputStream stream) {
81:                try {
82:                    return new StreamInJavaImpl(stream, config
83:                            .getInCharEncodingName(), config.tabsize);
84:                } catch (UnsupportedEncodingException e) {
85:                    throw new RuntimeException("Unsupported encoding: "
86:                            + e.getMessage());
87:                }
88:            }
89:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.