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


java.lang.Object
   com.sun.satsa.util.TLV

TLV
public class TLV (Code)
Used to represent each Type, Length, Value structure in a DER buffer.


Field Summary
final public static  intANY_STRING_TYPE
     ANY_STRING type used as a place holder.
final public static  intBITSTRING_TYPE
     ASN BIT STRING type used in certificate parsing.
final public static  intBMPSTR_TYPE
     ASN BIT STRING type used in certificate parsing.
final public static  intBOOLEAN_TYPE
     ASN BOOLEAN type used in certificate parsing.
final public static  intCONSTRUCTED
     ASN constructed flag used in types (0x20).
final public static  intCONTEXT
     ASN context specific flag used in types (0x80).
final public static  intENUMERATED_TYPE
     ASN ENUMERATED type.
final public static  intEXPLICIT
     ASN constructed flag used in types (0x20).
final public static  intEXTENSIONS_TYPE
     Context specific explicit type for certificate extensions.
final public static  intGEN_TIME_TYPE
     ASN Generalized time type used in certificate parsing.
final public static  intIA5STR_TYPE
     ASN IA5 STRING type used in certificate parsing.
final public static  intINTEGER_TYPE
     ASN INTEGER type used in certificate parsing.
final public static  intNULL_TYPE
     ASN NULL type used in certificate parsing.
final public static  intOCTETSTR_TYPE
     ASN OCTET STRING type used in certificate parsing.
final public static  intOID_TYPE
     ASN OBJECT ID type used in certificate parsing.
final public static  intPRINTSTR_TYPE
     ASN PrintableString type used in certificate parsing.
final public static  intSEQUENCE_TYPE
     ASN SEQUENCE type used in certificate parsing.
final public static  intSET_TYPE
     ASN SET type used in certificate parsing.
final public static  intTELETEXSTR_TYPE
     ASN TELETEX STRING type used in certificate parsing.
final public static  intUCT_TIME_TYPE
     ASN UCT time type used in certificate parsing.
final public static  intUNIVSTR_TYPE
     ASN UniversalString type used in certificate parsing.
final public static  intUTF8STR_TYPE
     ASN UTF8String type used in certificate parsing.
final public static  intVERSION_TYPE
     Context specific explicit type for certificate version.
public  TLVchild
     Non-null for constructed types, the first child TLV.
public  byte[]data
     Buffer that contains the DER encoded TLV.
public  intlength
     Number of bytes that make up the value.
public  TLVnext
     The next TLV in the parent sequence.
public  inttype
     Raw DER type.
public  intvalueOffset
     Offset of the value.

Constructor Summary
public  TLV(byte[] buffer, int offset)
     Constructs a TLV structure, recursing down for constructed types.
public  TLV(int tag)
     Constructs a TLV structure.
public  TLV(int tag, byte[] bytes)
     Constructs a TLV structure.
public  TLV(int tag, byte[] bytes, int offset)
     Constructs a TLV structure.

Method Summary
public  booleancheckFlag(int index)
     Returns the value of flag stored in bitsring value.
public  TLVcopy()
     Creates a copy of this TLV.
public static  TLVcreateIA5String(String s)
     Creates TLV object of type IA5 string.
public static  TLVcreateInteger(byte[] data)
     Creates TLV object of type integer.
public static  TLVcreateInteger(long value)
     Creates TLV object of type integer.
public static  TLVcreateOID(String oid)
     Creates TLV object of type OID.
public static  TLVcreateOctetString(byte[] data)
     Creates TLV object of type octet string.
public static  TLVcreateSequence()
     Creates TLV object of type sequence.
public static  TLVcreateUTCTime(Calendar time)
     Creates UTCTime TLV structure for given date.
public static  TLVcreateUTF8String(String s)
     Creates TLV object of type UTF8 string.
public  byte[]getDERData()
     Returns DER encoded TLV.
public  intgetDERData(byte[] buffer, int offset)
     Returns DER encoded TLV.
public  intgetDERSize()
     Returns the size of DER encoded TLV.
public  intgetEnumerated()
     Returns the value of enumerated type.
public  intgetId()
     Returns octet string value as integer.
public  intgetInteger()
     Returns integer value.
public  CalendargetTime()
     Returns time represented by this TLV.
public  StringgetUTF8()
     Returns string represented by this UTF8 string.
public  byte[]getValue()
     Returns the value field of this TLV.
public  booleanisString()
     Returns true if this value represents string.
public  booleanmatch(TLV t)
     Compares this object with other TLV object.
public  TLVsetChild(TLV child)
     Sets child element for this TLV object.
public  TLVsetNext(TLV next)
     Sets next element for this TLV object.
public  TLVsetTag(int tag)
     Sets the (implicit) tag value for this object.
public  TLVskipOptional(int type)
     Skips optional element of DER structure with given tag.
public  booleanvalueEquals(byte[] data)
     Compares the value of this TLV with given value.

Field Detail
ANY_STRING_TYPE
final public static int ANY_STRING_TYPE(Code)
ANY_STRING type used as a place holder. [UNIVERSAL 0]



BITSTRING_TYPE
final public static int BITSTRING_TYPE(Code)
ASN BIT STRING type used in certificate parsing. [UNIVERSAL 3]



BMPSTR_TYPE
final public static int BMPSTR_TYPE(Code)
ASN BIT STRING type used in certificate parsing. [UNIVERSAL 30]



BOOLEAN_TYPE
final public static int BOOLEAN_TYPE(Code)
ASN BOOLEAN type used in certificate parsing. [UNIVERSAL 1]



CONSTRUCTED
final public static int CONSTRUCTED(Code)
ASN constructed flag used in types (0x20).



CONTEXT
final public static int CONTEXT(Code)
ASN context specific flag used in types (0x80).



ENUMERATED_TYPE
final public static int ENUMERATED_TYPE(Code)
ASN ENUMERATED type. [UNIVERSAL 10]



EXPLICIT
final public static int EXPLICIT(Code)
ASN constructed flag used in types (0x20).



EXTENSIONS_TYPE
final public static int EXTENSIONS_TYPE(Code)
Context specific explicit type for certificate extensions. [CONTEXT EXPLICIT 3]



GEN_TIME_TYPE
final public static int GEN_TIME_TYPE(Code)
ASN Generalized time type used in certificate parsing. [UNIVERSAL 24]



IA5STR_TYPE
final public static int IA5STR_TYPE(Code)
ASN IA5 STRING type used in certificate parsing. [UNIVERSAL 22]



INTEGER_TYPE
final public static int INTEGER_TYPE(Code)
ASN INTEGER type used in certificate parsing. [UNIVERSAL 2]



NULL_TYPE
final public static int NULL_TYPE(Code)
ASN NULL type used in certificate parsing. [UNIVERSAL 5]



OCTETSTR_TYPE
final public static int OCTETSTR_TYPE(Code)
ASN OCTET STRING type used in certificate parsing. [UNIVERSAL 4]



OID_TYPE
final public static int OID_TYPE(Code)
ASN OBJECT ID type used in certificate parsing. [UNIVERSAL 6]



PRINTSTR_TYPE
final public static int PRINTSTR_TYPE(Code)
ASN PrintableString type used in certificate parsing. [UNIVERSAL 19]



SEQUENCE_TYPE
final public static int SEQUENCE_TYPE(Code)
ASN SEQUENCE type used in certificate parsing. [UNIVERSAL CONSTRUCTED 16]



SET_TYPE
final public static int SET_TYPE(Code)
ASN SET type used in certificate parsing. [UNIVERSAL CONSTRUCTED 17]



TELETEXSTR_TYPE
final public static int TELETEXSTR_TYPE(Code)
ASN TELETEX STRING type used in certificate parsing. [UNIVERSAL 20]



UCT_TIME_TYPE
final public static int UCT_TIME_TYPE(Code)
ASN UCT time type used in certificate parsing. [UNIVERSAL 23]



UNIVSTR_TYPE
final public static int UNIVSTR_TYPE(Code)
ASN UniversalString type used in certificate parsing. [UNIVERSAL 28].



UTF8STR_TYPE
final public static int UTF8STR_TYPE(Code)
ASN UTF8String type used in certificate parsing. [UNIVERSAL 12]



VERSION_TYPE
final public static int VERSION_TYPE(Code)
Context specific explicit type for certificate version. [CONTEXT EXPLICIT 0]



child
public TLV child(Code)
Non-null for constructed types, the first child TLV.



data
public byte[] data(Code)
Buffer that contains the DER encoded TLV.



length
public int length(Code)
Number of bytes that make up the value.



next
public TLV next(Code)
The next TLV in the parent sequence.



type
public int type(Code)
Raw DER type.



valueOffset
public int valueOffset(Code)
Offset of the value.




Constructor Detail
TLV
public TLV(byte[] buffer, int offset) throws TLVException(Code)
Constructs a TLV structure, recursing down for constructed types.
Parameters:
  buffer - DER buffer
Parameters:
  offset - where to start parsing
exception:
  IndexOutOfBoundsException - if the DER is corrupt
throws:
  TLVException - in case of parsing error



TLV
public TLV(int tag)(Code)
Constructs a TLV structure.
Parameters:
  tag - tag of new TLV



TLV
public TLV(int tag, byte[] bytes)(Code)
Constructs a TLV structure.
Parameters:
  tag - tag of the new TLV
Parameters:
  bytes - value of the new TLV



TLV
public TLV(int tag, byte[] bytes, int offset)(Code)
Constructs a TLV structure.
Parameters:
  tag - tag of the new TLV
Parameters:
  bytes - data for new TLV
Parameters:
  offset - of data




Method Detail
checkFlag
public boolean checkFlag(int index) throws TLVException(Code)
Returns the value of flag stored in bitsring value.
Parameters:
  index - flag index true if the flag is set
throws:
  TLVException - if TLV type is invalid



copy
public TLV copy()(Code)
Creates a copy of this TLV. The value of field next of the new TLV is null. a copy of this TLV



createIA5String
public static TLV createIA5String(String s) throws TLVException(Code)
Creates TLV object of type IA5 string.
Parameters:
  s - string value
throws:
  TLVException - if illegal string has been provided new object



createInteger
public static TLV createInteger(byte[] data)(Code)
Creates TLV object of type integer.
Parameters:
  data - value new object



createInteger
public static TLV createInteger(long value)(Code)
Creates TLV object of type integer.
Parameters:
  value - value new object



createOID
public static TLV createOID(String oid)(Code)
Creates TLV object of type OID.
Parameters:
  oid - OID in text form new object



createOctetString
public static TLV createOctetString(byte[] data)(Code)
Creates TLV object of type octet string.
Parameters:
  data - value new object



createSequence
public static TLV createSequence()(Code)
Creates TLV object of type sequence. new object



createUTCTime
public static TLV createUTCTime(Calendar time)(Code)
Creates UTCTime TLV structure for given date.
Parameters:
  time - date TLV value representing this date



createUTF8String
public static TLV createUTF8String(String s)(Code)
Creates TLV object of type UTF8 string.
Parameters:
  s - string value new object



getDERData
public byte[] getDERData()(Code)
Returns DER encoded TLV. DER encoded TLV



getDERData
public int getDERData(byte[] buffer, int offset)(Code)
Returns DER encoded TLV.
Parameters:
  buffer - target buffer
Parameters:
  offset - offset in the buffer value length



getDERSize
public int getDERSize()(Code)
Returns the size of DER encoded TLV. the size of DER encoded TLV



getEnumerated
public int getEnumerated() throws TLVException(Code)
Returns the value of enumerated type. the value
throws:
  TLVException - if TLV type is invalid



getId
public int getId() throws TLVException(Code)
Returns octet string value as integer. integer value
throws:
  TLVException - if this TLV is not octet string



getInteger
public int getInteger() throws TLVException(Code)
Returns integer value. integer value
throws:
  TLVException - if this TLV doesn't represent integer value



getTime
public Calendar getTime() throws TLVException(Code)
Returns time represented by this TLV. time value
throws:
  TLVException - if TLV type is invalid



getUTF8
public String getUTF8() throws TLVException(Code)
Returns string represented by this UTF8 string. string value
throws:
  TLVException - if TLV type is invalid



getValue
public byte[] getValue()(Code)
Returns the value field of this TLV. the value field of this TLV



isString
public boolean isString()(Code)
Returns true if this value represents string. true if this value represents string



match
public boolean match(TLV t)(Code)
Compares this object with other TLV object.
Parameters:
  t - TLV object true if both objects have the same type and containthe same data



setChild
public TLV setChild(TLV child)(Code)
Sets child element for this TLV object.
Parameters:
  child - the child object the passed value to allow chaining



setNext
public TLV setNext(TLV next)(Code)
Sets next element for this TLV object.
Parameters:
  next - the next object the passed value to allow chaining



setTag
public TLV setTag(int tag)(Code)
Sets the (implicit) tag value for this object.
Parameters:
  tag - tag value this value to allow call chaining



skipOptional
public TLV skipOptional(int type)(Code)
Skips optional element of DER structure with given tag.
Parameters:
  type - tag of optional value this object if type doesn't match or the next one if itdoes



valueEquals
public boolean valueEquals(byte[] data)(Code)
Compares the value of this TLV with given value.
Parameters:
  data - the value to be compared true if TLV object contains the same value



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.