Java Doc for MMSAddress.java in  » 6.0-JDK-Modules » j2me » com » sun » tck » wma » mms » 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 » 6.0 JDK Modules » j2me » com.sun.tck.wma.mms 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.tck.wma.mms.MMSAddress

MMSAddress
public class MMSAddress (Code)
MMS address parsing and validation. MMS address is validated according to Table D-2 in WMA2.0 specification. In addition address is parsed into the fields of MMSAddress object.


Field Summary
final public static  intAPP_ID
     Type corresponding to the application id address.
final public static  intEMAIL
     Type corresponding to the e-mail address.
final public static  intGLOBAL_PHONE_NUMBER
     Type corresponding to global phone number address.
final public static  intINVALID_ADDRESS
     Type corresponding to invalid address.
final public static  intIPV4
     Type corresponding to the ipv4 address.
final public static  intIPV6
     Type corresponding to the ipv6 address.
final public static  intSHORTCODE
     Type corresponding to the shortcode address.
public  Stringaddress
     Field that holds address part of the mms address (without "mms://" and ":" separator before app id).
public  StringappId
     Field that holds application id part of the mms address which appears after "mms://:" or after phone number, ipv4, or ipv6 followed by ":" .
public  inttype
     Type of this MMSAddress instance, INVALID_ADDRESS when uninitialized .

Constructor Summary
 MMSAddress()
     MMSAddress constructor to create uninitialized instance.
 MMSAddress(String address, String appId, int type)
     MMSAddress constructor to create initialized instance.

Method Summary
 voidclear()
     Clears MMSAddress fields.
 StringgetMMSAddressString()
     Creates a valid mms address corresponding to the values in this MMSAddress object.
public static  MMSAddressgetParsedMMSAddress(String addressStr)
     Determines whether a string represents a valid mms address as specified in WMA 2.0 specification and parses the incoming string into address and application id strings.
Parameters:
  addressStr - The string to check.
public static  MMSAddressgetParsedMMSAddress(String addressStr, MMSAddress mmsAddress)
     Determines whether a string represents a valid mms address as specified in WMA 2.0 specification and parses the incoming string into address and application id strings.
Parameters:
  addressStr - The string to check.
Parameters:
  mmsAddress - The return MMSAddress object whichfields will be filled with parsed address andapplication id, and correspoinding type (EMAIL, GLOBAL_PHONE_NUMBER,IPV4, IPV6, SHORTCODE, APP_ID).
static  booleanparseApplicationId(String s, int i, MMSAddress mmsAddress)
     Determines whether a string represents a valid application ID starting from an index.If the address string is a valid application id representation it is parsed into the fields of MMSAddress object (application id and null for the address). Application ID syntax is specified in WMA 2.0 spec as : ":"[*(1*(alpha | digit | "." | "_") ".")]1*(alpha | digit | "." | "_"). The number of characters in application ID must not exceed 32.
Parameters:
  s - The string to check.
Parameters:
  mmsAddress - The return MMSAddress object whichfields are filled with parsed address (null in this case) andapplication id, its type is set to APP_ID.
Parameters:
  i - The index of the string at which to start the check.
static  booleanparseEmail(String s, int i, MMSAddress mmsAddress)
     Determines whether a string represents a valid e-mail address starting from an index.
static  booleanparseIpv4(String s, int i, MMSAddress mmsAddress)
     Determines whether a string represents a valid ipv4 address starting from an index.
static  booleanparseIpv6(String s, int i, MMSAddress mmsAddress)
     Determines whether a string represents a valid ipv6 address starting from an index.
static  booleanparsePhoneNumber(String s, int i, MMSAddress mmsAddress)
     Determines whether a string represents a valid phone number starting from an index.
static  booleanparseShortCode(String s, int i, MMSAddress mmsAddress)
     Determines whether a string represents a valid shortcode starting from an index.
 voidset(String address, String appId, int type)
     Sets MMSAddress fields to the passed in values.
 voidsetAppid(String appId)
     Sets MMSAddress application id field to the passed in value.

Field Detail
APP_ID
final public static int APP_ID(Code)
Type corresponding to the application id address.



EMAIL
final public static int EMAIL(Code)
Type corresponding to the e-mail address.



GLOBAL_PHONE_NUMBER
final public static int GLOBAL_PHONE_NUMBER(Code)
Type corresponding to global phone number address.



INVALID_ADDRESS
final public static int INVALID_ADDRESS(Code)
Type corresponding to invalid address.



IPV4
final public static int IPV4(Code)
Type corresponding to the ipv4 address.



IPV6
final public static int IPV6(Code)
Type corresponding to the ipv6 address.



SHORTCODE
final public static int SHORTCODE(Code)
Type corresponding to the shortcode address.



address
public String address(Code)
Field that holds address part of the mms address (without "mms://" and ":" separator before app id).



appId
public String appId(Code)
Field that holds application id part of the mms address which appears after "mms://:" or after phone number, ipv4, or ipv6 followed by ":" .



type
public int type(Code)
Type of this MMSAddress instance, INVALID_ADDRESS when uninitialized .




Constructor Detail
MMSAddress
MMSAddress()(Code)
MMSAddress constructor to create uninitialized instance.



MMSAddress
MMSAddress(String address, String appId, int type)(Code)
MMSAddress constructor to create initialized instance.
Parameters:
  address - The address part of the mms address
Parameters:
  appId - The application id part of the mms address
Parameters:
  type - The type of this mms addreess(EMAIL, GLOBAL_PHONE_NUMBER, IPV4, IPV6, SHORTCODE, APP_ID)




Method Detail
clear
void clear()(Code)
Clears MMSAddress fields. Type is set to INVALID_ADDRESS while address and appId are set to null.



getMMSAddressString
String getMMSAddressString()(Code)
Creates a valid mms address corresponding to the values in this MMSAddress object. If the object is not intialized null is returned. mms address corresponding to this MMSAddress object.



getParsedMMSAddress
public static MMSAddress getParsedMMSAddress(String addressStr)(Code)
Determines whether a string represents a valid mms address as specified in WMA 2.0 specification and parses the incoming string into address and application id strings.
Parameters:
  addressStr - The string to check. newly created MMSAddress object if addressStr is a valid mms address; null otherwise



getParsedMMSAddress
public static MMSAddress getParsedMMSAddress(String addressStr, MMSAddress mmsAddress)(Code)
Determines whether a string represents a valid mms address as specified in WMA 2.0 specification and parses the incoming string into address and application id strings.
Parameters:
  addressStr - The string to check.
Parameters:
  mmsAddress - The return MMSAddress object whichfields will be filled with parsed address andapplication id, and correspoinding type (EMAIL, GLOBAL_PHONE_NUMBER,IPV4, IPV6, SHORTCODE, APP_ID). MMSAddress object if addressStr is a valid mms address; null otherwise



parseApplicationId
static boolean parseApplicationId(String s, int i, MMSAddress mmsAddress)(Code)
Determines whether a string represents a valid application ID starting from an index.If the address string is a valid application id representation it is parsed into the fields of MMSAddress object (application id and null for the address). Application ID syntax is specified in WMA 2.0 spec as : ":"[*(1*(alpha | digit | "." | "_") ".")]1*(alpha | digit | "." | "_"). The number of characters in application ID must not exceed 32.
Parameters:
  s - The string to check.
Parameters:
  mmsAddress - The return MMSAddress object whichfields are filled with parsed address (null in this case) andapplication id, its type is set to APP_ID.
Parameters:
  i - The index of the string at which to start the check. 0 <= i <= s.length() true if s represents a valid application ID starting from index i; false otherwise and if index i isinvalide value



parseEmail
static boolean parseEmail(String s, int i, MMSAddress mmsAddress)(Code)
Determines whether a string represents a valid e-mail address starting from an index. If the address string is a valid e-mail address representation it is parsed into the fields of MMSAddress object (address and null for appId). E-mail syntax is specified in WMA 2.0 spec.
Parameters:
  s - The string to check.
Parameters:
  i - The index of the string at which to start the check. 0 <= i <= s.length()
Parameters:
  mmsAddress - The return MMSAddress object whichfields are filled with parsed address andapplication id (null in this case), its type is set to EMAIL. true if s represents a valid e-mail address starting from index i; false otherwise and if index i isinvalide value



parseIpv4
static boolean parseIpv4(String s, int i, MMSAddress mmsAddress)(Code)
Determines whether a string represents a valid ipv4 address starting from an index. If the address string is a valid ipv4 representation it is parsed into the fields of MMSAddress object (address and application id). ipv4 syntax is specified in WMA 2.0 spec as : 1*3digit "." 1*3digit "." 1*3digit "." 1*3digit [applicationId]
Parameters:
  s - The string to check.
Parameters:
  mmsAddress - The return MMSAddress object whichfields are filled with parsed address andapplication id (which can be null), its type is set to IPV4.
Parameters:
  i - The index of the string at which to start the check. 0 <= i <= s.length() true if s represents a valid ipv4 address starting from index i; false otherwise and if index i isinvalide value



parseIpv6
static boolean parseIpv6(String s, int i, MMSAddress mmsAddress)(Code)
Determines whether a string represents a valid ipv6 address starting from an index. If the address string is a valid ipv6 representation it is parsed into the fields of MMSAddress object (address and application id). ipv6 syntax is specified in WMA 2.0 spec as : ipv6-atom ":" ipv6-atom ":" ipv6-atom ":" ipv6-atom ":" ipv6-atom ":" ipv6-atom ":" ipv6-atom ":" ipv6-atom [appId] where ipv6-atom is 1*4(digit | hex-alpha).
Parameters:
  s - The string to check.
Parameters:
  mmsAddress - The return MMSAddress object whichfields are filled with parsed address andapplication id (which can be null), its type is set to IPV6.
Parameters:
  i - The index of the string at which to start the check. 0 <= i <= s.length() true if s represents a valid ipv6 address starting from index i; false otherwise and if index i isinvalide value



parsePhoneNumber
static boolean parsePhoneNumber(String s, int i, MMSAddress mmsAddress)(Code)
Determines whether a string represents a valid phone number starting from an index. If the address string is a valid phone number representation it is parsed into the fields of MMSAddress object (address and application id). General phone number syntax is specified in WMA 2.0 spec as : ("+" 1*digit | 1*digit) [applicationId]
Parameters:
  s - The string to check.
Parameters:
  mmsAddress - The return MMSAddress object whichfields are filled with parsed address andapplication id (which can be null), its type is set to GLOBAL_PHONE_NUMBER.
Parameters:
  i - The index of the string at which to start the check. 0 <= i <= s.length() true if s represents a valid phone number starting from index i; false otherwise and if index i isinvalide value



parseShortCode
static boolean parseShortCode(String s, int i, MMSAddress mmsAddress)(Code)
Determines whether a string represents a valid shortcode starting from an index. If the address string is a valid shortcode representation it is parsed into the fields of MMSAddress object (address and null for appId). Shortcode syntax is specified in WMA 2.0 spec as : (digit | alpha)
Parameters:
  s - The string to check.
Parameters:
  mmsAddress - The return MMSAddress object whichfields are filled with parsed address and application id (null inthis case), its type is set to SHORTCODE.
Parameters:
  i - The index of the string at which to start the check. 0 <= i <= s.length() true if s represents a valid shortcode starting from index i; false otherwise and if index i isinvalide value



set
void set(String address, String appId, int type)(Code)
Sets MMSAddress fields to the passed in values.
Parameters:
  address - The address part of the mms address
Parameters:
  appId - The application id part of the mms address
Parameters:
  type - The type of this mms addreess(EMAIL, GLOBAL_PHONE_NUMBER, IPV4, IPV6, SHORTCODE, APP_ID)



setAppid
void setAppid(String appId)(Code)
Sets MMSAddress application id field to the passed in value.
Parameters:
  appId - The application id part of the mms address



Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.