在java.io包中,Java.io.InputStream表示字节输入流,java.io.OutputStream表示字节输出流。







































//当通过着类来读取数据时,它会依次从所有被串联的输入流中读取数据。
SequenceInputStream sis=new SequenceInputStream(v.elements());
int length=-1;

while((length=sis.read())!=-1)...{
System.out.println((char)length);
}
sis.close();
}
}









































//打印
FileOutputStream fow=new FileOutputStream("g://1.txt",true);
PrintWriter pw=new PrintWriter(new OutputStreamWriter(fow));
pw.println("adsfasfdasfdasfddsafasd");
PrintWriter pw=new PrintWriter(new OutputStreamWriter(fow));
pw.println("adsfasfdasfdasfddsafasd");
//读取ini文件
Properties prop = new Properties();
InputStream in = new FileInputStream("db.ini");
prop.load(in);
System.out.println(prop.getProperty("username"));
System.out.println(prop.getProperty("username1","dfdf"));
System.out.println(prop.getProperty("password"));
}
}
InputStream in = new FileInputStream("db.ini");
prop.load(in);
System.out.println(prop.getProperty("username"));
System.out.println(prop.getProperty("username1","dfdf"));
System.out.println(prop.getProperty("password"));










































































































