Checks whether the character is ASCII 7 bit control. : String ASCII « Data Type « Java

Java
1. 2D Graphics GUI
2. 3D
3. Advanced Graphics
4. Ant
5. Apache Common
6. Chart
7. Class
8. Collections Data Structure
9. Data Type
10. Database SQL JDBC
11. Design Pattern
12. Development Class
13. EJB3
14. Email
15. Event
16. File Input Output
17. Game
18. Generics
19. GWT
20. Hibernate
21. I18N
22. J2EE
23. J2ME
24. JDK 6
25. JNDI LDAP
26. JPA
27. JSP
28. JSTL
29. Language Basics
30. Network Protocol
31. PDF RTF
32. Reflection
33. Regular Expressions
34. Scripting
35. Security
36. Servlets
37. Spring
38. Swing Components
39. Swing JFC
40. SWT JFace Eclipse
41. Threads
42. Tiny Application
43. Velocity
44. Web Services SOA
45. XML
Java Tutorial
Java Source Code / Java Documentation
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 » Data Type » String ASCIIScreenshots 
Checks whether the character is ASCII 7 bit control.
  

/**
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


/**
 * <p>Operations on char primitives and Character objects.</p>
 *
 * <p>This class tries to handle <code>null</code> input gracefully.
 * An exception will not be thrown for a <code>null</code> input.
 * Each method documents its behaviour in more detail.</p>
 
 @author Stephen Colebourne
 @since 2.1
 @version $Id: CharUtils.java 437554 2006-08-28 06:21:41Z bayard $
 */
public class Main {
  /**
   * <p>Checks whether the character is ASCII 7 bit control.</p>
   *
   * <pre>
   *   CharUtils.isAsciiControl('a')  = false
   *   CharUtils.isAsciiControl('A')  = false
   *   CharUtils.isAsciiControl('3')  = false
   *   CharUtils.isAsciiControl('-')  = false
   *   CharUtils.isAsciiControl('\n') = true
   *   CharUtils.isAsciiControl('&copy;') = false
   * </pre>
   
   @param ch  the character to check
   @return true if less than 32 or equals 127
   */
  public static boolean isAsciiControl(char ch) {
      return ch < 32 || ch == 127;
  }
}

   
    
  
Related examples in the same category
1. Checks whether the character is ASCII 7 bit.
2. Checks whether the character is ASCII 7 bit printable.
3. Checks whether the character is ASCII 7 bit alphabetic.
4. Checks whether the character is ASCII 7 bit alphabetic upper case.
5. Checks whether the character is ASCII 7 bit alphabetic lower case.
6. Checks whether the character is ASCII 7 bit numeric.
7. Checks whether the character is ASCII 7 bit numeric and character.
8. Allow text containing mostly ASCII characters to be decipherable on an ASCII terminal without decoding.
9. Removes control characters (char <= 32) from both ends returning null if the String is empty ("") after the trim or if it is null
10. Removes control characters (char <= 32) from both ends returning an empty String ("") if the String is empty ("") after the trim or if it is null.
11. Get 7-bit ASCII character array from input String.
12. Test if the character is a digit <digit> ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
13. Test if the current character is a digit <digit> ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
14. Test if the current character is a new line.
15. Test if the current character is a space.
16. Test if the current character is an Alpha character : <alpha> ::= [0x41-0x5A] | [0x61-0x7A]
17. Test if the current character is an Ident character
18. Test if the current character is equal to a specific character.
19. Test if the current string is a digit <digit> ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
20. Removes spaces (char <= 32) from both start and ends of this bytes array
21. Removes spaces (char <= 32) from end of this String with escape, handling null by returning null
22. Removes spaces (char <= 32) from end of this String, handling null by returning null
23. Removes spaces (char <= 32) from end of this array by index, handling null by returning null
24. Removes spaces (char <= 32) from end of this array ny position, handling null by returning null
25. Removes spaces (char <= 32) from end of this array, handling null by returning null
26. Removes spaces (char <= 32) from start of this String, handling null by returning null
27. Removes spaces (char <= 32) from start of this array, handling null by returning null
28. Thansform an array of ASCII bytes to a string. the byte array should contains only values in [0, 127].
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.