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


java.lang.Object
   com.sun.midp.ssl.Record

Record
class Record (Code)
Implements an SSL record layer that sits atop a TCP connection and beneath the user-visible interface to an SSL socket. It maintains all the state information necessary to encode/decode application data.


Field Summary
final static  byteALRT
     Alert (21).
final static  byteAPP
     Application data (23).
final static  byteBAD_CERT
     Bad certificate alert type (42).
final static  byteBAD_MAC
     Bad MAC alert type (20).
final static  byteBAD_PARAM
     Bad parameter alert type (47).
final static  byteCCS
     Change Cipher Spec (20).
final static  byteCERT_EXPRD
     Certificate expired alaert type (45).
final static  byteCERT_REVKD
     Certificate revoked alert type (44).
final static  byteCERT_UNKWN
     Unknown certificate feature alert type (46).
final static  byteCLIENT
     Client role for SSL record layout (1).
final static  byteCLOSE_NTFY
     Close notification alert type (0).
final static  byteFATAL
     Fatal severity level for alerts (2).
final static  byteHNDSHK
     Handshake (22).
final static  byteHNDSHK_FAIL
     Handshake failure alert type (40).
final static  byteNO_CERT
     No certificate found alert type (41).
final static  byteSERVER
     Server role for SSL record layout (0).
final static  byteUNEXP_MSG
     Unexpected message alert type (10).
final static  byteUNSUP_CERT
     Unsupported certificate alert type (43).
final static  byteWARNING
     Warning severity level for alerts (1).
 byte[]inputData
     Current input record data.
 intplainTextLength
    

Constructor Summary
 Record(InputStream ins, OutputStream outs)
     Creates a new SSL record layer.

Method Summary
public  voidalert(byte level, byte type)
     Sends an alert message of the specified level and type to the SSL peer.
 voidcloseInputStream()
    
 voidcloseOutputStream()
    
 voidinit(byte role, byte[] clientRand, byte[] serverRand, byte suite, byte[] masterSecret)
     Chops up a master secret into the client and server MAC secrets, bulk encryption keys and IVs.
 voidrdRec(boolean block, byte type)
     Reads and returns a record (including the 5-byte header) of the specified type.
public  voidshutdownConnection()
     Send a close notify and shutdown the TCP connection if needed.
 voidwrRec(byte type, byte[] buf, int off, int len)
     Writes an SSL record to the underlying socket's output stream.
Parameters:
  type - record type (one of CCS, ALRT, HNDSHK or APP)
Parameters:
  buf - byte array containing the record body (i.e.

Field Detail
ALRT
final static byte ALRT(Code)
Alert (21).



APP
final static byte APP(Code)
Application data (23).



BAD_CERT
final static byte BAD_CERT(Code)
Bad certificate alert type (42).



BAD_MAC
final static byte BAD_MAC(Code)
Bad MAC alert type (20).



BAD_PARAM
final static byte BAD_PARAM(Code)
Bad parameter alert type (47).



CCS
final static byte CCS(Code)
Change Cipher Spec (20).



CERT_EXPRD
final static byte CERT_EXPRD(Code)
Certificate expired alaert type (45).



CERT_REVKD
final static byte CERT_REVKD(Code)
Certificate revoked alert type (44).



CERT_UNKWN
final static byte CERT_UNKWN(Code)
Unknown certificate feature alert type (46).



CLIENT
final static byte CLIENT(Code)
Client role for SSL record layout (1).



CLOSE_NTFY
final static byte CLOSE_NTFY(Code)
Close notification alert type (0).



FATAL
final static byte FATAL(Code)
Fatal severity level for alerts (2).



HNDSHK
final static byte HNDSHK(Code)
Handshake (22).



HNDSHK_FAIL
final static byte HNDSHK_FAIL(Code)
Handshake failure alert type (40).



NO_CERT
final static byte NO_CERT(Code)
No certificate found alert type (41).



SERVER
final static byte SERVER(Code)
Server role for SSL record layout (0).



UNEXP_MSG
final static byte UNEXP_MSG(Code)
Unexpected message alert type (10).



UNSUP_CERT
final static byte UNSUP_CERT(Code)
Unsupported certificate alert type (43).



WARNING
final static byte WARNING(Code)
Warning severity level for alerts (1).



inputData
byte[] inputData(Code)
Current input record data.



plainTextLength
int plainTextLength(Code)
Length of the plain text in the input buffer




Constructor Detail
Record
Record(InputStream ins, OutputStream outs)(Code)
Creates a new SSL record layer.
Parameters:
  ins - input stream belonging to the underlying TCP connection
Parameters:
  outs - output stream belonging to the underlying TCP connection




Method Detail
alert
public void alert(byte level, byte type)(Code)
Sends an alert message of the specified level and type to the SSL peer.
Parameters:
  level - one of WARNING or FATAL)
Parameters:
  type - one of CLOSE_NTFY, UNEXP_MSG, BAD_MAC, DECOMP_FAIL,HNDSHK_FAIL, NO_CERT, BAD_CERT, UNSUP_CERT, CERT_REVKD,CERT_EXPRD, CERT_UNKWN, BAD_PARAM



closeInputStream
void closeInputStream()(Code)
Close input stream



closeOutputStream
void closeOutputStream()(Code)
Close output stream



init
void init(byte role, byte[] clientRand, byte[] serverRand, byte suite, byte[] masterSecret) throws Exception(Code)
Chops up a master secret into the client and server MAC secrets, bulk encryption keys and IVs. Also initializes the Cipher and MessageDigest objects used in record encoding/decoding.
Parameters:
  role - role (either CLIENT or SERVER) of this side in the SSL negotiation
Parameters:
  clientRand - 32-byte random value chosen by the client
Parameters:
  serverRand - 32-byte random value chosen by the server
Parameters:
  suite - negotiated cipher suite
Parameters:
  masterSecret - master secret resulting from the key exchange
exception:
  Exception - if the negotiated cipher suite involves an unsupported hash or cipher algorithm



rdRec
void rdRec(boolean block, byte type) throws IOException(Code)
Reads and returns a record (including the 5-byte header) of the specified type. If the caller asks for application data and a close_notify warning alert is found as the next available record, this method sets plainTextLength to -1 to signal the end of the input stream.
Parameters:
  block - if true the method will not return until data is available,or end of stream
Parameters:
  type - desired SSL record type
exception:
  IOException - if an unexpected record type or SSL alert isfound in the underlying sockets input stream



shutdownConnection
public void shutdownConnection()(Code)
Send a close notify and shutdown the TCP connection if needed.



wrRec
void wrRec(byte type, byte[] buf, int off, int len) throws IOException(Code)
Writes an SSL record to the underlying socket's output stream.
Parameters:
  type - record type (one of CCS, ALRT, HNDSHK or APP)
Parameters:
  buf - byte array containing the record body (i.e. everythingbut the 5-byte header)
Parameters:
  off - starting offset of the record body inside buf
Parameters:
  len - length of the record body, the maximum is 2^14 +2048 asdefined by RFC 2246
exception:
  IOException - if an I/O error occurs.



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.