:\test1.txt"); initialization is written to writer. WriteLine ("hi Hello 123"); writes a line of writer. Close (); Wu, Textreader/textwriterThe Textreader/textwriter class is primarily used to process streaming data. They provide efficient text stream read/write capabilities, respectively.textreader/Writer reads and writes TextReader TextReader =New StringReader ("Hi, hi.");//Initialize Read stream
:// StreamWriter Write New StreamWriter (@ "D:\test1.txt"); // initialization is written to writer. WriteLine ("hi Hello 123"); // writes a line of writer. Close ();Wu, Textreader/textwriterThe Textreader/textwriter class is primarily used to process streaming data. They provide efficient text stream read/write capabilities, respectively.Copy Code//textreader/writer Reading and writingTextReader TextReader =NewStringReader (" Hi, hi.");//Initialize re
Java IO stream learning summary and javaio stream Summary
Classes or interfaces related to Java stream operations:
Java stream class diagram structure:
Concept and function of stream
Byte stream summary, byte stream Summary
Byte stream Summary
InputStream (Abstract class: indicates the parent class of all byte input streams.)
|-FileInputStream (It is mainly used for raw byte streams such as image data.)
|-Filt
A stream is an abstract concept of a sequence of bytes.The file is the static storage form of the data, and the stream refers to the form of transmission.The flow class is divided into two categories: node stream class and Filter flow class (also called process Flow Class).The program is used to directly manipulate the target device's corresponding class called N
generally only need to master 17 kinds offileinputstream//file byte output streamfileoutputstream//file byte output streamFileReader//file character input streamFileWriter//file character output streambufferedreader//Cache character Input streambufferedwriter//Cache Character Output streambufferedinputstream//Cache byte Input streambufferedoutputstream//Cache byte output streamdatainputstream//Data input Streamdataoutputstream//Data output streamobjectinputstream.//Object Input Streamobjectoutp
Java IO Stream Learning Summary one: input and output stream
Reprint please indicate source: http://blog.csdn.net/zhaoyanjun6/article/details/54292148This article is from "Zhaoyan's blog"
Java Flow class diagram structure:Concept and function of flowA stream is a set of sequences of bytes that have a star
manipulate files, so the constructor receives two types of parameters: A. string file path; B.file object.
The object can read and write to the file, and can specify the mode of operation when the object is instantiated (R,RW)
Note: When the object is instantiated, it is created automatically if the file to be manipulated does not exist, and if the file exists, the write data does not specify a location and is written from scratch, overwriting the original content. can be used for mult
the text file (5 ways)2:io Flow Summary (master)IO stream|--Byte stream|--byte input streamInputStreamint read (): reads one byte at a timeint read (byte[] bys): reads one byte array at a time|--fileinputstream|--bufferedinputstream|--byte output streamOutputStreamvoid write (int by): Write one byte at a timevoid Write (byte[] bys,int. index, int len): Write one
2015211233090 Java programming 1st weekly learning summary and javaio stream learning Summary
1. Learning Summary
A preliminary understanding of Object-Oriented Programming
Use eclipse to associate git to manage code
Java
2. Written Assignments
P: Why can java programs run across platforms? What are the steps for execu
transform stream. The Read method in the transform stream. has been integrated into the Code table, the underlying invocation of the Read method of the byte stream will fetch one or more bytes of data to be stored temporarily, and to check the specified encoding table, if the encoding table is not specified, check the default Code table. Then the Read method of
the location; 4) access to all read () and write () operations in DataInputStream and DataOutputStream; 5) In the file Move method: A. Long Getfilepointer (): Returns the current position of the file pointer. B. void seek (Long POS): Sets the file pointer to the given absolute position. C. Long Length (): Returns the length of the file. 12. Encoding problem: Encoding: Each character corresponds to an integer. Different countries have different codes, when the encoding and decodin
manipulate files, so the constructor receives two types of parameters: A. string file path; B.file object.
The object can read and write to the file, and can specify the mode of operation when the object is instantiated (R,RW)
Note: When the object is instantiated, it is created automatically if the file to be manipulated does not exist, and if the file exists, the write data does not specify a location and is written from scratch, overwriting the original content. can be used for mult
with an internal pointer. The object features:
The object can only manipulate files, so the constructor receives two types of parameters: A. string file path; B.file object.
The object can read and write to the file, and can specify the mode of operation when the object is instantiated (R,RW)
Note: When the object is instantiated, it is created automatically if the file to be manipulated does not exist, and if the file exists, the write data does not specify a location and is
object features:
The object can only manipulate files, so the constructor receives two types of parameters: A. string file path; B.file object.
The object can read and write to the file, and can specify the mode of operation when the object is instantiated (R,RW)
Note: When the object is instantiated, it is created automatically if the file to be manipulated does not exist, and if the file exists, the write data does not specify a location and is written from scratch, overwrit
class
A file class is an object that encapsulates files and folders in a file system. You can use the object idea to operate files and folders. File class stores various metadata information about a file or directory, including the file name, file length, last modification time, whether the file is readable, and obtaining the path name of the current file, determine whether a specified file exists, obtain the file list in the current directory, and create or delete files and directories.9. rand
whether the specified file exists, obtains a list of files in the current directory, and creates and deletes files and directories.9.RandomAccessFile classThis object is not a member of the flow system, it encapsulates a byte stream, and also encapsulates a buffer (a character array), manipulating the data in a character array with an internal pointer. The object features:
The object can only manipulate files, so the constructor receives two
manipulate files, so the constructor receives two types of parameters: A. string file path; B.file object.
The object can read and write to the file, and can specify the mode of operation when the object is instantiated (R,RW)
Note: When the object is instantiated, it is created automatically if the file to be manipulated does not exist, and if the file exists, the write data does not specify a location and is written from scratch, overwriting the original content. Can be used for mult
an internal pointer. The object features:
The object can only manipulate files, so the constructor receives two types of parameters: A. string file path; B.file object.
The object can read and write to the file, and can specify the mode of operation when the object is instantiated (R,RW)
Note: When the object is instantiated, it is created automatically if the file to be manipulated does not exist, and if the file exists, the write data does not specify a location and is writt
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.