Java Doc for ByteHolder.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » store » raw » data » 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.impl.store.raw.data 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derby.impl.store.raw.data.ByteHolder

All known Subclasses:   org.apache.derby.impl.store.raw.data.MemByteHolder,
ByteHolder
public interface ByteHolder (Code)
Holder for a growing sequence of bytes. The ByteHolder supports a writing phase in which a caller appends bytes to the ByteHolder. Later the caller may read the bytes out of the ByteHolder in the order they were written.




Method Summary
public  intavailable()
     Return the number of bytes that can be read from this ByteHolder without blocking on an IO.
public  voidclear()
     Clear the bytes from the ByteHolder and place it in writing mode.
public  intnumBytesSaved()
     Return the number of bytes that have been saved to this byte holder.
public  intread()
     Read a byte from this ByteHolder.
public  intread(byte b, int off, int len)
     Read up to 'len' bytes from this ByteHolder and store them in an array at offset 'off'.
public  intread(OutputStream out, int len)
     Read from the ByteHolder.
public  intshiftToFront()
    
public  longskip(long count)
     Skip over the specified number of bytes in a ByteHolder.
public  voidstartReading()
     Place a ByteHolder in reading mode.
public  voidwrite(int b)
     Write a byte to this ByteHolder.
public  voidwrite(byte[] data, int offset, int len)
     Write len bytes of data starting at 'offset' to this ByteHolder.
public  longwrite(InputStream in, long count)
     Write up to count bytes from an input stream to this ByteHolder.
public  booleanwritingMode()
     Return true if this is in writing mode.



Method Detail
available
public int available() throws IOException(Code)
Return the number of bytes that can be read from this ByteHolder without blocking on an IO.



clear
public void clear() throws IOException(Code)
Clear the bytes from the ByteHolder and place it in writing mode. This may not free the memory the ByteHolder uses to store data.



numBytesSaved
public int numBytesSaved() throws IOException(Code)
Return the number of bytes that have been saved to this byte holder. This result is different from available() as it is unaffected by the current read position on the ByteHolder.



read
public int read() throws IOException(Code)
Read a byte from this ByteHolder.

The ByteHolder must be in reading mode to call this. The byte or -1 if there are no bytes available.




read
public int read(byte b, int off, int len) throws IOException(Code)
Read up to 'len' bytes from this ByteHolder and store them in an array at offset 'off'.

The ByteHolder must be in reading mode to call this. the number of bytes read or -1 if the this ByteHolderhas no more bytes.




read
public int read(OutputStream out, int len) throws IOException(Code)
Read from the ByteHolder.

Read up to 'len' bytes from this ByteHolder and write them to the OutputStream

The ByteHolder must be in reading mode to call this. the number of bytes read or -1 if the this ByteHolderhas no more bytes.




shiftToFront
public int shiftToFront() throws IOException(Code)
shift the remaining unread bytes to the beginning of the byte holder



skip
public long skip(long count) throws IOException(Code)
Skip over the specified number of bytes in a ByteHolder.



startReading
public void startReading() throws IOException(Code)
Place a ByteHolder in reading mode. After this call, reads scan bytes sequentially in the order they were written to the ByteHolder starting from the first byte. When the ByteHolder is already in readmode this simply arranges for reads to start at the beginning of the sequence of saved bytes.



write
public void write(int b) throws IOException(Code)
Write a byte to this ByteHolder.

The ByteHolder must be in writing mode to call this.




write
public void write(byte[] data, int offset, int len) throws IOException(Code)
Write len bytes of data starting at 'offset' to this ByteHolder.

The ByteHolder must be in writing mode to call this.




write
public long write(InputStream in, long count) throws IOException(Code)
Write up to count bytes from an input stream to this ByteHolder. This may write fewer bytes if it encounters an end of file on the input stream. the number of bytes written.
exception:
  IOException - thrown when reading in causes anerror.



writingMode
public boolean writingMode()(Code)
Return true if this is in writing mode.



w_ww___.jav__a_2___s___.c___o__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.