如何编程?DataInputStreamin=?newDataInputStream(?newBufferedInputStream( newFileInputStream("Data.txt");DataOutputStreamout=?newDataOutputStream(?newBufferedOutputStream( newFileOutputStream("Data.txt");面向字符流的文件和控制台的读写如何编程?读控制台BufferedReaderstdIn=newBufferedReader(newInputStreamReader(System.in));Stringinput=stdIn.readLine();写控制台:PrintWriterstdOut=newPrintWriter(System.out,true);stdOut.println(“”);读文件:BufferedReaderfileIn=newBufferedReader(newFileReader(“filename”));Stringline=fileIn.readLine();写文件:newPrintWriter(newFileWriter(“filename”)); fileOut.println("Alineofoutput.");参考:privatevoidwriteFile(Stringfilename,Stringcontent)throwsIOException{Filefile=newFile(filename); if(!file.exists()){ file.createNewFile();}PrintWriterfileOut=newPrintWriter(file);fileOut.println(content);fileOut.close();?}