Java Doc for CurnUtil.java in  » RSS-RDF » curn » org » clapper » curn » 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 » RSS RDF » curn » org.clapper.curn 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.clapper.curn.CurnUtil

CurnUtil
public class CurnUtil (Code)
Miscellaneous utility methods that are shared among classes, but don't logically belong anywhere in particular.
version:
   $Revision: 7041 $

Inner Class :public enum IndexMarker



Method Summary
public static  FilecreateTempXMLFile()
     Create a temporary file for XML content.
public static  PrintWritergetErrorOut()
     Get a PrintWriter for writing error messages to the screen.
public static  ResourceBundlegetResourceBundle(Locale locale)
     Get the resource bundle.
public static  StringgetResourceFromBundle(String key, Locale locale)
     Get a string (resource) from the resource bundle.
public static  StringmakeRollingFileWriterPattern(File file, IndexMarker indexMarkerLoc)
     Transform a File object into a RollingFileWriter pattern.
public static  FilemapConfiguredPathName(String pathName)
     Map a configured path name to a File object.
public static  URLnormalizeURL(URL url)
     Normalize a URL, by forcing its host name and protocol to lower case.
Parameters:
  url - The URL to normalize.
public static  URLnormalizeURL(String url)
     Normalize a URL, by forcing its host name and protocol to lower case.
public static  WriteropenOutputFile(File file, String encoding, IndexMarker indexMarkerLoc, int totalBackups)
     Open a file that might require backing up.
public static  StringurlToLookupKey(URL url)
     Convert a URL to a lookup key, by normalizing it and converting it to a string.



Method Detail
createTempXMLFile
public static File createTempXMLFile() throws IOException(Code)
Create a temporary file for XML content. the temp file
throws:
  IOException - error creating temporary file



getErrorOut
public static PrintWriter getErrorOut()(Code)
Get a PrintWriter for writing error messages to the screen. a suitable PrintWriter



getResourceBundle
public static ResourceBundle getResourceBundle(Locale locale)(Code)
Get the resource bundle.
Parameters:
  locale - the locale to use, or null for the default the resource bundle
See Also:   Constants.BUNDLE_NAME
See Also:   CurnUtil.getResourceFromBundle



getResourceFromBundle
public static String getResourceFromBundle(String key, Locale locale)(Code)
Get a string (resource) from the resource bundle.
Parameters:
  key - the key for the resource to look up
Parameters:
  locale - the locale to use, or null for the default the resource bundle, or null if the resource doesn't exist
See Also:   Constants.BUNDLE_NAME
See Also:   CurnUtil.getResourceBundle



makeRollingFileWriterPattern
public static String makeRollingFileWriterPattern(File file, IndexMarker indexMarkerLoc)(Code)
Transform a File object into a RollingFileWriter pattern.
Parameters:
  file - the file
Parameters:
  indexMarkerLoc - where the RollingFileWriter index markershould go the transformed path string



mapConfiguredPathName
public static File mapConfiguredPathName(String pathName)(Code)
Map a configured path name to a File object. This method parses the path name and converts any Unix-style path separators to the appropriate separator for the current platform. Use of this method allows Unix-style paths in the configuration file, even on non-Unix systems (which also bypasses some parsing issues).
Parameters:
  pathName - the path name to map an appropriate File object for the current system.



normalizeURL
public static URL normalizeURL(URL url)(Code)
Normalize a URL, by forcing its host name and protocol to lower case.
Parameters:
  url - The URL to normalize. a new URL object representing the normalized URL
See Also:   CurnUtil.normalizeURL(String)



normalizeURL
public static URL normalizeURL(String url) throws MalformedURLException(Code)
Normalize a URL, by forcing its host name and protocol to lower case.
Parameters:
  url - The URL to normalize, as a string a new URL object representing the normalized URL
See Also:   CurnUtil.normalizeURL(URL)
throws:
  MalformedURLException - bad URL string



openOutputFile
public static Writer openOutputFile(File file, String encoding, IndexMarker indexMarkerLoc, int totalBackups) throws IOExceptionExt(Code)
Open a file that might require backing up. Takes care of transforming the file name into a RollingFileWriter pattern, if necessary.
Parameters:
  file - the file to open
Parameters:
  encoding - encoding to use when opening the file, or nullfor the default
Parameters:
  totalBackups - total backups to keep, if positive
Parameters:
  indexMarkerLoc - where the RollingFileWriter index markershould go. Ignored unless totalBackupsis positive. a PrintWriter for the output
throws:
  IOExceptionExt - on error



urlToLookupKey
public static String urlToLookupKey(URL url)(Code)
Convert a URL to a lookup key, by normalizing it and converting it to a string. Calling this method ensures that everyone converts a URL to a key the same way.
Parameters:
  url - the URL the lookup key (really, the normalized, stringified URL)



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.