Java Doc for IOCase.java in  » Library » apache-common-IO » org » apache » commons » io » 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 » Library » apache common IO » org.apache.commons.io 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.io.IOCase

IOCase
final public class IOCase implements Serializable(Code)
Enumeration of IO case sensitivity.

Different filing systems have different rules for case-sensitivity. Windows is case-insensitive, Unix is case-sensitive.

This class captures that difference, providing an enumeration to control how filename comparisons should be performed. It also provides methods that use the enumeration to perform comparisons.

Wherever possible, you should use the check methods in this class to compare filenames.
author:
   Stephen Colebourne
version:
   $Id: IOCase.java 484844 2006-12-08 23:27:18Z ggregory $
since:
   Commons IO 1.3



Field Summary
final public static  IOCaseINSENSITIVE
     The constant for case insensitive regardless of operating system.
final public static  IOCaseSENSITIVE
     The constant for case sensitive regardless of operating system.
final public static  IOCaseSYSTEM
     The constant for case sensitivity determined by the current operating system.


Method Summary
public  booleancheckEndsWith(String str, String end)
     Checks if one string ends with another using the case-sensitivity rule.
public  booleancheckEquals(String str1, String str2)
     Compares two strings using the case-sensitivity rule.
public  booleancheckRegionMatches(String str, int strStartIndex, String search)
     Checks if one string contains another at a specific index using the case-sensitivity rule.
public  booleancheckStartsWith(String str, String start)
     Checks if one string starts with another using the case-sensitivity rule.
 StringconvertCase(String str)
     Converts the case of the input String to a standard format.
public static  IOCaseforName(String name)
     Factory method to create an IOCase from a name.
public  StringgetName()
     Gets the name of the constant.
public  booleanisCaseSensitive()
     Does the object represent case sensitive comparison.
public  StringtoString()
     Gets a string describing the sensitivity.

Field Detail
INSENSITIVE
final public static IOCase INSENSITIVE(Code)
The constant for case insensitive regardless of operating system.



SENSITIVE
final public static IOCase SENSITIVE(Code)
The constant for case sensitive regardless of operating system.



SYSTEM
final public static IOCase SYSTEM(Code)
The constant for case sensitivity determined by the current operating system. Windows is case-insensitive when comparing filenames, Unix is case-sensitive.

If you derialize this constant of Windows, and deserialize on Unix, or vice versa, then the value of the case-sensitivity flag will change.






Method Detail
checkEndsWith
public boolean checkEndsWith(String str, String end)(Code)
Checks if one string ends with another using the case-sensitivity rule.

This method mimics String.endsWith but takes case-sensitivity into account.
Parameters:
  str - the string to check, not null
Parameters:
  end - the end to compare against, not null true if equal using the case rules
throws:
  NullPointerException - if either string is null




checkEquals
public boolean checkEquals(String str1, String str2)(Code)
Compares two strings using the case-sensitivity rule.

This method mimics String.equals but takes case-sensitivity into account.
Parameters:
  str1 - the first string to compare, not null
Parameters:
  str2 - the second string to compare, not null true if equal using the case rules
throws:
  NullPointerException - if either string is null




checkRegionMatches
public boolean checkRegionMatches(String str, int strStartIndex, String search)(Code)
Checks if one string contains another at a specific index using the case-sensitivity rule.

This method mimics parts of String.regionMatches(booleanintStringintint) but takes case-sensitivity into account.
Parameters:
  str - the string to check, not null
Parameters:
  strStartIndex - the index to start at in str
Parameters:
  search - the start to search for, not null true if equal using the case rules
throws:
  NullPointerException - if either string is null




checkStartsWith
public boolean checkStartsWith(String str, String start)(Code)
Checks if one string starts with another using the case-sensitivity rule.

This method mimics String.startsWith(String) but takes case-sensitivity into account.
Parameters:
  str - the string to check, not null
Parameters:
  start - the start to compare against, not null true if equal using the case rules
throws:
  NullPointerException - if either string is null




convertCase
String convertCase(String str)(Code)
Converts the case of the input String to a standard format. Subsequent operations can then use standard String methods.
Parameters:
  str - the string to convert, null returns null the lower-case version if case-insensitive



forName
public static IOCase forName(String name)(Code)
Factory method to create an IOCase from a name.
Parameters:
  name - the name to find the IOCase object
throws:
  IllegalArgumentException - if the name is invalid



getName
public String getName()(Code)
Gets the name of the constant. the name of the constant



isCaseSensitive
public boolean isCaseSensitive()(Code)
Does the object represent case sensitive comparison. true if case sensitive



toString
public String toString()(Code)
Gets a string describing the sensitivity. a string describing the sensitivity



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.