Java Doc for RawToBinaryFormatStream.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » types » 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 » Database DBMS » db derby 10.2 » org.apache.derby.iapi.types 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derby.iapi.services.io.LimitInputStream
   org.apache.derby.iapi.types.RawToBinaryFormatStream

RawToBinaryFormatStream
final public class RawToBinaryFormatStream extends LimitInputStream (Code)
Stream that takes a raw input stream and converts it to the on-disk format of the binary types by prepending the length of the value.

If the length of the stream is known then it is encoded as the first bytes in the stream in the defined format.
If the length is unknown then the first four bytes will be zero, indicating unknown length.
Note: This stream cannot be re-used. Once end of file is reached, the next read call will throw an EOFException
See Also:   SQLBinary




Constructor Summary
public  RawToBinaryFormatStream(InputStream in, int length)
     Create a binary on-disk stream from the given InputStream.
public  RawToBinaryFormatStream(InputStream in, int maximumLength, String typeName)
     Create a binary on-disk stream from the given InputStream of unknown length. A limit is placed on the maximum length of the stream.
Parameters:
  in - the application stream
Parameters:
  maximumLength - maximum length of the column data is inserted into
Parameters:
  typeName - type name for the column data is inserted into
throws:
  IllegalArgumentException - if maximum length is negative, or typename is null.

Method Summary
public  intread()
     Read from the wrapped stream prepending the intial bytes if needed.
public  intread(byte b, int off, int len)
     Read from the wrapped stream prepending the intial bytes if needed.


Constructor Detail
RawToBinaryFormatStream
public RawToBinaryFormatStream(InputStream in, int length)(Code)
Create a binary on-disk stream from the given InputStream. The on-disk stream prepends a length encoding, and validates that the actual length of the stream matches the specified length (as according to JDBC 3.0).
Parameters:
  in - application's raw binary stream passed into JDBC layer
Parameters:
  length - length of the stream
throws:
  IllegalArgumentException - if length is negative.This exception should never be exposed to the user, and seeing itmeans a programming error exists in the code.



RawToBinaryFormatStream
public RawToBinaryFormatStream(InputStream in, int maximumLength, String typeName)(Code)
Create a binary on-disk stream from the given InputStream of unknown length. A limit is placed on the maximum length of the stream.
Parameters:
  in - the application stream
Parameters:
  maximumLength - maximum length of the column data is inserted into
Parameters:
  typeName - type name for the column data is inserted into
throws:
  IllegalArgumentException - if maximum length is negative, or typename is null. This exception should never be exposedto the user, and seeing it means a programming error exists in thecode. Although a missing type name is not critical, an exception isis thrown to signal the intended use of this constructor.




Method Detail
read
public int read() throws IOException(Code)
Read from the wrapped stream prepending the intial bytes if needed. If stream has been read, and eof reached, in that case any subsequent read will throw an EOFException



read
public int read(byte b, int off, int len) throws IOException(Code)
Read from the wrapped stream prepending the intial bytes if needed. If stream has been read, and eof reached, in that case any subsequent read will throw an EOFException



Fields inherited from org.apache.derby.iapi.services.io.LimitInputStream
protected boolean limitInPlace(Code)(Java Doc)
protected int remainingBytes(Code)(Java Doc)

Methods inherited from org.apache.derby.iapi.services.io.LimitInputStream
public int available() throws IOException(Code)(Java Doc)
public int clearLimit()(Code)(Java Doc)
public int read() throws IOException(Code)(Java Doc)
public int read(byte b, int off, int len) throws IOException(Code)(Java Doc)
public void setInput(InputStream in)(Code)(Java Doc)
public void setLimit(int length)(Code)(Java Doc)
public long skip(long count) throws IOException(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.