Download Package java.io

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
1
Package java.io
Provides for system input and output through data streams, serialization and the file system.
Interface Summary
Closeable
A Closeable is a source or destination of data that can be closed.
DataInput
The DataInput interface provides for reading bytes from a binary stream and
reconstructing from them data in any of the Java primitive types.
DataOutput
The DataOutput interface provides for converting data from any of the Java primitive
types to a series of bytes and writing these bytes to a binary stream.
Externalizable
Only the identity of the class of an Externalizable instance is written in the serialization
stream and it is the responsibility of the class to save and restore the contents of its
instances.
FileFilter
A filter for abstract pathnames.
FilenameFilter
Instances of classes that implement this interface are used to filter filenames.
Flushable
A Flushable is a destination of data that can be flushed.
ObjectInput
ObjectInput extends the DataInput interface to include the reading of objects.
ObjectInputValidation
Callback interface to allow validation of objects within a graph.
ObjectOutput
ObjectOutput extends the DataOutput interface to include writing of objects.
ObjectStreamConstants
Constants written into the Object Serialization Stream.
Serializable
Serializability of a class is enabled by the class implementing the java.io.Serializable
interface.
Class Summary
BufferedInputStream
A BufferedInputStream adds functionality to another input stream-namely, the
ability to buffer the input and to support the mark and reset methods.
BufferedOutputStream
The class implements a buffered output stream.
BufferedReader
Reads text from a character-input stream, buffering characters so as to provide for the
efficient reading of characters, arrays, and lines.
BufferedWriter
Writes text to a character-output stream, buffering characters so as to provide for the
efficient writing of single characters, arrays, and strings.
ByteArrayInputStream
A ByteArrayInputStream contains an internal buffer that contains bytes that
may be read from the stream.
ByteArrayOutputStream
This class implements an output stream in which the data is written into a byte array.
CharArrayReader
This class implements a character buffer that can be used as a character-input stream.
CharArrayWriter
This class implements a character buffer that can be used as an Writer.
Console
Methods to access the character-based console device, if any, associated with the
current Java virtual machine.
DataInputStream
A data input stream lets an application read primitive Java data types from an
underlying input stream in a machine-independent way.
DataOutputStream
A data output stream lets an application write primitive Java data types to an output
stream in a portable way.
File
An abstract representation of file and directory pathnames.
2
FileDescriptor
Instances of the file descriptor class serve as an opaque handle to the underlying
machine-specific structure representing an open file, an open socket, or another source
or sink of bytes.
FileInputStream
A FileInputStream obtains input bytes from a file in a file system.
FileOutputStream
A file output stream is an output stream for writing data to a File or to a
FileDescriptor.
FilePermission
This class represents access to a file or directory.
FileReader
Convenience class for reading character files.
FileWriter
Convenience class for writing character files.
FilterInputStream
A FilterInputStream contains some other input stream, which it uses as its
basic source of data, possibly transforming the data along the way or providing
additional functionality.
FilterOutputStream
This class is the superclass of all classes that filter output streams.
FilterReader
Abstract class for reading filtered character streams.
FilterWriter
Abstract class for writing filtered character streams.
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
InputStreamReader
An InputStreamReader is a bridge from byte streams to character streams: It reads
bytes and decodes them into characters using a specified charset.
LineNumberInputStream
Deprecated. This class incorrectly assumes that bytes adequately represent
characters.
LineNumberReader
A buffered character-input stream that keeps track of line numbers.
ObjectInputStream
An ObjectInputStream deserializes primitive data and objects previously written using
an ObjectOutputStream.
ObjectInputStream.GetField
Provide access to the persistent fields read from the input stream.
ObjectOutputStream
An ObjectOutputStream writes primitive data types and graphs of Java objects to an
OutputStream.
ObjectOutputStream.PutField Provide programmatic access to the persistent fields to be written to ObjectOutput.
ObjectStreamClass
Serialization's descriptor for classes.
ObjectStreamField
A description of a Serializable field from a Serializable class.
OutputStream
This abstract class is the superclass of all classes representing an output stream of
bytes.
OutputStreamWriter
An OutputStreamWriter is a bridge from character streams to byte streams: Characters
written to it are encoded into bytes using a specified charset.
PipedInputStream
A piped input stream should be connected to a piped output stream; the piped input
stream then provides whatever data bytes are written to the piped output stream.
PipedOutputStream
A piped output stream can be connected to a piped input stream to create a
communications pipe.
PipedReader
Piped character-input streams.
PipedWriter
Piped character-output streams.
PrintStream
A PrintStream adds functionality to another output stream, namely the ability to
print representations of various data values conveniently.
PrintWriter
Prints formatted representations of objects to a text-output stream.
3
PushbackInputStream
A PushbackInputStream adds functionality to another input stream, namely the
ability to "push back" or "unread" one byte.
PushbackReader
A character-stream reader that allows characters to be pushed back into the stream.
RandomAccessFile
Instances of this class support both reading and writing to a random access file.
Reader
Abstract class for reading character streams.
SequenceInputStream
A SequenceInputStream represents the logical concatenation of other input
streams.
SerializablePermission
This class is for Serializable permissions.
StreamTokenizer
The StreamTokenizer class takes an input stream and parses it into "tokens",
allowing the tokens to be read one at a time.
StringBufferInputStream
Deprecated. This class does not properly convert characters into bytes.
StringReader
A character stream whose source is a string.
StringWriter
A character stream that collects its output in a string buffer, which can then be used to
construct a string.
Writer
Abstract class for writing to character streams.
Exception Summary
CharConversionException
Base class for character conversion exceptions.
EOFException
Signals that an end of file or end of stream has been reached unexpectedly during
input.
FileNotFoundException
Signals that an attempt to open the file denoted by a specified pathname has failed.
InterruptedIOException
Signals that an I/O operation has been interrupted.
InvalidClassException
Thrown when the Serialization runtime detects one of the following problems with a
Class.
InvalidObjectException
Indicates that one or more deserialized objects failed validation tests.
IOException
Signals that an I/O exception of some sort has occurred.
NotActiveException
Thrown when serialization or deserialization is not active.
NotSerializableException
Thrown when an instance is required to have a Serializable interface.
ObjectStreamException
Superclass of all exceptions specific to Object Stream classes.
OptionalDataException
Exception indicating the failure of an object read operation due to unread primitive
data, or the end of data belonging to a serialized object in the stream.
StreamCorruptedException
Thrown when control information that was read from an object stream violates
internal consistency checks.
SyncFailedException
Signals that a sync operation has failed.
UnsupportedEncodingException The Character Encoding is not supported.
UTFDataFormatException
Signals that a malformed string in modified UTF-8 format has been read in a data
input stream or by any class that implements the data input interface.
WriteAbortedException
Signals that one of the ObjectStreamExceptions was thrown during a write
operation.
Error Summary
IOError
Thrown when a serious I/O error has occurred.
4
Package java.sql
Provides the API for accessing and processing data stored in a data source (usually a relational database) using the
JavaTM programming language. This API includes a framework whereby different drivers can be installed dynamically
to access different data sources. Although the JDBCTM API is mainly geared to passing SQL statements to a database, it
provides for reading and writing data from any data source with a tabular format. The reader/writer facility, available
through the javax.sql.RowSet group of interfaces, can be customized to use and update data from a spread sheet,
flat file, or any other tabular data source.
Interface Summary
Array
The mapping in the Java programming language for the SQL type ARRAY.
Blob
The representation (mapping) in the JavaTM programming language of an SQL BLOB value.
CallableStatement
The interface used to execute SQL stored procedures.
Clob
The mapping in the JavaTM programming language for the SQL CLOB type.
Connection
A connection (session) with a specific database.
DatabaseMetaData
Comprehensive information about the database as a whole.
Driver
The interface that every driver class must implement.
NClob
The mapping in the JavaTM programming language for the SQL NCLOB type.
ParameterMetaData
An object that can be used to get information about the types and properties for each
parameter marker in a PreparedStatement object.
PreparedStatement
An object that represents a precompiled SQL statement.
Ref
The mapping in the Java programming language of an SQL REF value, which is a reference
to an SQL structured type value in the database.
ResultSet
A table of data representing a database result set, which is usually generated by executing a
statement that queries the database.
ResultSetMetaData
An object that can be used to get information about the types and properties of the columns
in a ResultSet object.
RowId
The representation (mapping) in the Java programming language of an SQL ROWID value.
Savepoint
The representation of a savepoint, which is a point within the current transaction that can be
referenced from the Connection.rollback method.
SQLData
The interface used for the custom mapping of an SQL user-defined type (UDT) to a class in
the Java programming language.
SQLInput
An input stream that contains a stream of values representing an instance of an SQL
structured type or an SQL distinct type.
SQLOutput
The output stream for writing the attributes of a user-defined type back to the database.
SQLXML
The mapping in the JavaTM programming language for the SQL XML type.
Statement
The object used for executing a static SQL statement and returning the results it produces.
Struct
The standard mapping in the Java programming language for an SQL structured type.
Wrapper
Interface for JDBC classes which provide the ability to retrieve the delegate instance when
the instance in question is in fact a proxy class.
5
Class Summary
Date
A thin wrapper around a millisecond value that allows JDBC to identify this as an SQL DATE
value.
DriverManager
The basic service for managing a set of JDBC drivers.
NOTE: The DataSource interface, new in the JDBC 2.0 API, provides another way to connect
to a data source.
DriverPropertyInfo Driver properties for making a connection.
SQLPermission
The permission for which the SecurityManager will check when code that is running in an
applet calls the DriverManager.setLogWriter method or the
DriverManager.setLogStream (deprecated) method.
Time
A thin wrapper around the java.util.Date class that allows the JDBC API to identify this as
an SQL TIME value.
Timestamp
A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL
TIMESTAMP value.
Types
The class that defines the constants that are used to identify generic SQL types, called JDBC
types.
Enum Summary
ClientInfoStatus
Enumeration for status of the reason that a property could not be set via a call to
Connection.setClientInfo
RowIdLifetime
Enumeration for RowId life-time values.
Exception Summary
BatchUpdateException
The subclass of SQLException thrown when an error occurs during a
batch update operation.
DataTruncation
An exception thrown as a DataTruncation exception (on writes) or
reported as a DataTruncation warning (on reads) when a data
values is unexpectedly truncated for reasons other than its having
execeeded MaxFieldSize.
SQLClientInfoException
The subclass of SQLException is thrown when one or more client
info properties could not be set on a Connection.
SQLDataException
The subclass of SQLException thrown when the SQLState class
value is '22'.
SQLException
An exception that provides information on a database access error or
other errors.
SQLFeatureNotSupportedException
The subclass of SQLException thrown when the SQLState class
value is '0A' ( the value is 'zero' A).
SQLIntegrityConstraintViolationException
The subclass of SQLException thrown when the SQLState class
value is '23'.
SQLInvalidAuthorizationSpecException
The subclass of SQLException thrown when the SQLState class
value is '28'.
6
SQLNonTransientConnectionException
The subclass of SQLException thrown for the SQLState class value
'08', representing that the connection operation that failed will not
succeed when the operation is retried without the cause of the failure
being corrected.
SQLNonTransientException
The subclass of SQLException thrown when an instance where a
retry of the same operation would fail unless the cause of the
SQLException is corrected.
SQLRecoverableException
The subclass of SQLException thrown in situations where a
previously failed operation might be able to succeed if the application
performs some recovery steps and retries the entire transaction or in the
case of a distributed transaction, the transaction branch.
SQLSyntaxErrorException
The subclass of SQLException thrown when the SQLState class
value is '42'.
SQLTimeoutException
The subclass of SQLException thrown when the timeout specified by
Statement has expired.
SQLTransactionRollbackException
The subclass of SQLException thrown when the SQLState class
value is '40'.
SQLTransientConnectionException
The subclass of SQLException for the SQLState class value '08',
representing that the connection operation that failed might be able to
succeed when the operation is retried without any application-level
changes.
SQLTransientException
The subclass of SQLException is thrown in situations where a
previoulsy failed operation might be able to succeed when the operation
is retried without any intervention by application-level functionality.
SQLWarning
An exception that provides information on database access warnings.
.