DataInputStream和DataOutputStream
用于储存对象的成员数据(字节,字符,布尔值,字符串---字符串会被转为UTF-8)
public Example15{
public static void main(String[] args){
FileOutputStream fos = new FileOutputStream("d:\BaiduYunGuanjia\feriosa");
BufferedOutputStream bos = new BufferedOutputStream(fos);
DataOutputStream dos = new DataOutputStream(bos);
FileInputStream fis = new FileInputStream("d:\BaiduYunGuanjia\feriosa");
BufferedInputStream bis = new BufferedInputStream(fis);
DataInputStream ds = new DataInputStream(bis);