net.rim.device.api.ui.text
Class FilenameTextFilter

java.lang.Object
  extended by net.rim.device.api.ui.text.TextFilter
      extended by net.rim.device.api.ui.text.FilenameTextFilter

public class FilenameTextFilter
extends TextFilter

Filters out characters not usable in filename strings.

This filter accepts valid filename characters for FAT16/FAT32 filesystems. Non-valid characters for a FAT16 filename are: < ,> , : , " , \\ , | , * , ? , / , and any character less than 0x20.

Since:
BlackBerry API 4.2.0

Field Summary
 
Fields inherited from class net.rim.device.api.ui.text.TextFilter
ADN_SIM_PHONE, DEFAULT, DEFAULT_SMART_PHONE, EMAIL, FDN_SIM_PHONE, FILENAME, HEXADECIMAL, INTEGER, IP, LOWERCASE, NUMERIC, PHONE, PIN_ADDRESS, REAL_NUMERIC, SIM_PHONE, SMS_PHONE, STYLE_SHIFT, UPPERCASE, URL, VOICEMAIL_PHONE
 
Constructor Summary
FilenameTextFilter()
          Constructs a new FilenameTextFilter instance.
 
Method Summary
 char convert(char character, int status)
          Passes character through Filename text filter.
 boolean validate(char character)
          Determines if character is a valid filename character for a FAT16 filename.
 
Methods inherited from class net.rim.device.api.ui.text.TextFilter
convert, get, validate, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

FilenameTextFilter

public FilenameTextFilter()
Constructs a new FilenameTextFilter instance.

Since:
BlackBerry API 4.2.0


Method Detail

convert

public char convert(char character,
                    int status)
Passes character through Filename text filter.

Specified by:
convert in class TextFilter
Parameters:
character - Character to translate.
status - Ignored.
Returns:
Returns provided character. No conversions needed
Since:
BlackBerry API 4.2.0

validate

public boolean validate(char character)
Determines if character is a valid filename character for a FAT16 filename.

Specified by:
validate in class TextFilter
Parameters:
character - Character to perform a validity test on.
Returns:
False if passed a invalid character for FAT16 filename; otherwise, true.
Since:
BlackBerry API 4.2.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal