Source Code Cross Referenced for ObjectInput.java in  » Apache-Harmony-Java-SE » java-package » java » io » 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 » Apache Harmony Java SE » java package » java.io 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */
017:
018:        package java.io;
019:
020:        /**
021:         * Streams to be used with serialization to read objects must implement this
022:         * interface. ObjectInputStream is one example.
023:         * 
024:         * @see ObjectInputStream
025:         * @see ObjectOutput
026:         */
027:        public interface ObjectInput extends DataInput {
028:            /**
029:             * Answers a int representing then number of bytes of primitive data that
030:             * are available.
031:             * 
032:             * @return int the number of primitive bytes available.
033:             * 
034:             * @throws IOException
035:             *             If an error occurs in this ObjectInput.
036:             */
037:            public int available() throws IOException;
038:
039:            /**
040:             * Close this ObjectInput. Concrete implementations of this class should
041:             * free any resources during close.
042:             * 
043:             * @throws IOException
044:             *             If an error occurs attempting to close this ObjectInput.
045:             */
046:            public void close() throws IOException;
047:
048:            /**
049:             * Reads a single byte from this ObjectInput and returns the result as an
050:             * int. The low-order byte is returned or -1 of the end of stream was
051:             * encountered.
052:             * 
053:             * @return int The byte read or -1 if end of ObjectInput.
054:             * 
055:             * @throws IOException
056:             *             If the ObjectInput is already closed or another IOException
057:             *             occurs.
058:             */
059:            public int read() throws IOException;
060:
061:            /**
062:             * Reads bytes from the <code>ObjectInput</code> and stores them in byte
063:             * array <code>buffer</code>. Blocks while waiting for input.
064:             * 
065:             * @param buffer
066:             *            the array in which to store the read bytes.
067:             * @return how many bytes were read or <code>-1</code> if encountered end
068:             *         of <code>ObjectInput</code>.
069:             * 
070:             * @throws IOException
071:             *             If the <code>ObjectInput</code> is already closed or
072:             *             another IOException occurs.
073:             */
074:            public int read(byte[] buffer) throws IOException;
075:
076:            /**
077:             * Reads at most <code>count</code> bytes from the ObjectInput and stores
078:             * them in byte array <code>buffer</code> starting at offset
079:             * <code>count</code>. Answer the number of bytes actually read or -1 if
080:             * no bytes were read and end of ObjectInput was encountered.
081:             * 
082:             * @param buffer
083:             *            the byte array in which to store the read bytes.
084:             * @param offset
085:             *            the offset in <code>buffer</code> to store the read bytes.
086:             * @param count
087:             *            the maximum number of bytes to store in <code>buffer</code>.
088:             * @return the number of bytes actually read or -1 if end of ObjectInput.
089:             * 
090:             * @throws IOException
091:             *             If the ObjectInput is already closed or another IOException
092:             *             occurs.
093:             */
094:            public int read(byte[] buffer, int offset, int count)
095:                    throws IOException;
096:
097:            /**
098:             * Reads the next object from this ObjectInput.
099:             * 
100:             * @return the next object read from this ObjectInput
101:             * 
102:             * @throws IOException
103:             *             If an error occurs attempting to read from this ObjectInput.
104:             * @throws ClassNotFoundException
105:             *             If the object's class cannot be found
106:             */
107:            public Object readObject() throws ClassNotFoundException,
108:                    IOException;
109:
110:            /**
111:             * Skips <code>toSkip</code> number of bytes in this ObjectInput.
112:             * Subsequent <code>read()</code>'s will not return these bytes.
113:             * 
114:             * @param toSkip
115:             *            the number of bytes to skip.
116:             * @return the number of bytes actually skipped.
117:             * 
118:             * @throws IOException
119:             *             If the ObjectInput is already closed or another IOException
120:             *             occurs.
121:             */
122:            public long skip(long toSkip) throws IOException;
123:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.