Java Doc for ObjectInput.java in  » JDK-Core » io-nio » java » io » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. JDK Core
2. JDK Modules
3. JDK Modules com.sun
4. JDK Modules com.sun.java
5. JDK Modules Platform
6. JDK Modules sun
7. Open Source Build
8. Open Source Graphic Library
9. Open Source IDE Eclipse
10. Open Source J2EE
11. Open Source JDBC Driver
12. Open Source Library
13. Open Source Library Database
14. Open Source Net
15. Open Source Script
16. Science
17. Security
18. Sevlet Container
19. SUN GlassFish
20. Swing Library
21. Web Services apache cxf 2.0.1
22. Web Services AXIS2
23. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java Source Code / Java Documentation » JDK Core » io nio » java.io 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.io.ObjectInput

All known Subclasses:   java.io.ObjectInputStream,
ObjectInput
public interface ObjectInput extends DataInput(Code)
ObjectInput extends the DataInput interface to include the reading of objects. DataInput includes methods for the input of primitive types, ObjectInput extends that interface to include objects, arrays, and Strings.
author:
   unascribed
version:
   1.26, 05/05/07
See Also:   java.io.InputStream
See Also:   java.io.ObjectOutputStream
See Also:   java.io.ObjectInputStream
since:
   JDK1.1




Method Summary
public  intavailable()
     Returns the number of bytes that can be read without blocking.
public  voidclose()
     Closes the input stream.
public  intread()
     Reads a byte of data.
public  intread(byte b)
     Reads into an array of bytes.
public  intread(byte b, int off, int len)
     Reads into an array of bytes.
public  ObjectreadObject()
     Read and return an object.
public  longskip(long n)
     Skips n bytes of input.



Method Detail
available
public int available() throws IOException(Code)
Returns the number of bytes that can be read without blocking. the number of available bytes.
exception:
  IOException - If an I/O error has occurred.



close
public void close() throws IOException(Code)
Closes the input stream. Must be called to release any resources associated with the stream.
exception:
  IOException - If an I/O error has occurred.



read
public int read() throws IOException(Code)
Reads a byte of data. This method will block if no input is available. the byte read, or -1 if the end of thestream is reached.
exception:
  IOException - If an I/O error has occurred.



read
public int read(byte b) throws IOException(Code)
Reads into an array of bytes. This method will block until some input is available.
Parameters:
  b - the buffer into which the data is read the actual number of bytes read, -1 isreturned when the end of the stream is reached.
exception:
  IOException - If an I/O error has occurred.



read
public int read(byte b, int off, int len) throws IOException(Code)
Reads into an array of bytes. This method will block until some input is available.
Parameters:
  b - the buffer into which the data is read
Parameters:
  off - the start offset of the data
Parameters:
  len - the maximum number of bytes read the actual number of bytes read, -1 isreturned when the end of the stream is reached.
exception:
  IOException - If an I/O error has occurred.



readObject
public Object readObject() throws ClassNotFoundException, IOException(Code)
Read and return an object. The class that implements this interface defines where the object is "read" from. the object read from the stream
exception:
  java.lang.ClassNotFoundException - If the class of a serializedobject cannot be found.
exception:
  IOException - If any of the usual Input/Outputrelated exceptions occur.



skip
public long skip(long n) throws IOException(Code)
Skips n bytes of input.
Parameters:
  n - the number of bytes to be skipped the actual number of bytes skipped.
exception:
  IOException - If an I/O error has occurred.



w___w__w_.___j___a_v_a_2s.__com_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.