Java Doc for IOUtils.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cocoon.util.IOUtils

IOUtils
public class IOUtils (Code)
A collection of File, URL and filename utility methods
author:
   Ricardo Rocha
author:
   Stefano Mazzocchi
version:
   CVS $Id: IOUtils.java 433543 2006-08-22 06:22:54Z crossley $


Field Summary
final static  CollatorenglishCollator
    
final static  charkeywordSuffix
    
final static  Stringkeywords
     These are java keywords as specified at the following URL (sorted alphabetically).


Method Summary
public static  StringbaseName(String filename)
    
public static  ObjectbytesToObject(byte[] bytes)
     Returns a object from the given byte array.
public static  FilecreateFile(File destDir, String filename)
     Return a file with the given filename creating the necessary directories if not present.
public static  ObjectdeserializeObject(File file)
     This method deserializes an object from an input stream.
public static  StringdeserializeString(File file)
     Load a text file contents as a String.
public static  StringfileComponent(String filename)
    
public static  StringgetContextFilePath(String directoryPath, String filePath)
    
public static  StringgetFullFilename(File file)
     Get the complete filename corresponding to a (typically relative) File.
public static  StringnormalizedFilename(String filename)
     Return a modified filename suitable for replicating directory structures below the store's base directory.
public static  byte[]objectToBytes(Object object)
     Returns a byte array from the given object.
public static  StringpathComponent(String filename)
    
public static  voidserializeObject(File file, Object object)
     This method serializes an object to an output stream.
public static  voidserializeString(File file, String string)
     Dump a String to a text file.
public static  voidserializeString(File file, String string, String encoding)
     Dump a String to a text file.

Field Detail
englishCollator
final static Collator englishCollator(Code)
Collator for comparing the strings



keywordSuffix
final static char keywordSuffix(Code)
Use this character as suffix



keywords
final static String keywords(Code)
These are java keywords as specified at the following URL (sorted alphabetically). http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#229308





Method Detail
baseName
public static String baseName(String filename)(Code)
Strip a filename of its last extension (the portion immediately following the last dot character, if any)
Parameters:
  filename - The filename The filename sans extension



bytesToObject
public static Object bytesToObject(byte[] bytes) throws IOException, ClassNotFoundException(Code)
Returns a object from the given byte array.
Parameters:
  bytes - array to convert object



createFile
public static File createFile(File destDir, String filename)(Code)
Return a file with the given filename creating the necessary directories if not present.
Parameters:
  filename - The file The created File instance



deserializeObject
public static Object deserializeObject(File file) throws IOException, ClassNotFoundException(Code)
This method deserializes an object from an input stream.
Parameters:
  file - The input file The deserialized object
exception:
  IOException - IOError



deserializeString
public static String deserializeString(File file) throws IOException(Code)
Load a text file contents as a String. This method does not perform enconding conversions
Parameters:
  file - The input file The file contents as a String
exception:
  IOException - IO Error



fileComponent
public static String fileComponent(String filename)(Code)
Remove path information from a filename returning only its file component
Parameters:
  filename - The filename The filename sans path information



getContextFilePath
public static String getContextFilePath(String directoryPath, String filePath)(Code)
Return the path within a base directory



getFullFilename
public static String getFullFilename(File file)(Code)
Get the complete filename corresponding to a (typically relative) File. This method accounts for the possibility of an error in getting the filename's canonical path, returning the io/error-safe absolute form instead
Parameters:
  file - The file The file's absolute filename



normalizedFilename
public static String normalizedFilename(String filename)(Code)
Return a modified filename suitable for replicating directory structures below the store's base directory. The following conversions are performed:
  • Path separators are converted to regular directory names
  • File path components are transliterated to make them valid (?) programming language identifiers. This transformation may well generate collisions for unusual filenames.
The transformed filename



objectToBytes
public static byte[] objectToBytes(Object object) throws IOException(Code)
Returns a byte array from the given object.
Parameters:
  object - to convert byte array from the object



pathComponent
public static String pathComponent(String filename)(Code)
Remove file information from a filename returning only its path component
Parameters:
  filename - The filename The path information



serializeObject
public static void serializeObject(File file, Object object) throws IOException(Code)
This method serializes an object to an output stream.
Parameters:
  file - The output file
Parameters:
  object - The object to be serialized
exception:
  IOException - IOError



serializeString
public static void serializeString(File file, String string) throws IOException(Code)
Dump a String to a text file.
Parameters:
  file - The output file
Parameters:
  string - The string to be dumped
exception:
  IOException - IO Error



serializeString
public static void serializeString(File file, String string, String encoding) throws IOException(Code)
Dump a String to a text file.
Parameters:
  file - The output file
Parameters:
  string - The string to be dumped
Parameters:
  encoding - The encoding for the output file or null for default platform encoding
exception:
  IOException - IO Error



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.