Package The package for IO and FS operation is java.io.
Access File System
File Use the class File to access file system, such as rename, delete, listFile, etc.
xxx
Input Get input from any source of data that can send out a sequence of bytes, such as file, network, memory etc.
InputStream
FileInputStream
StringInputStream Read data from a string object.
DataInputStream Read the specified length of data, Read boolean, long, float, int, short, byte, UTF, xxx Read a line,
RandomAccessFile Allows reading from and writing to a file in a random-access manner. If the file is
opened in read/write mode, write operations are available as well. The
position of the next read or write operation can be moved forwards and
backwards after every operation.
Output Send output to any destination that can receive a sequence of bytes.
OutputStream
FileOutputStream
StringOutputStream Write data to a string object.
DataOutputStream Write the specified length of data,
Write boolean, long, float, int, short, byte, UTF, xxx
ParcelFileDescriptor & AssetFileDescriptor
ParcelFileDescriptor ParcelFileDescriptor is created from File/Socket object, and it implements Parcel that can be transfered between different components/applications
AssetFileDescriptor Create FileInputStream/FileOutputStream object with ParcelFileDescriptor object,
public final class SavingsAccount implements Serializable { private long mId; private name = mName; private mX, mY, mW, mH;
ObjectStreamField[] mFields = { new ObjectStreamField(“x”, Double.TYPE), new ObjectStreamField(“y”, Double.TYPE), new ObjectStreamField(“w”, Double.TYPE), new ObjectStreamField(“h”, Double.TYPE), };