Danh mục

Lập trình Java cơ bản : Luồng và xử lý file part 2

Số trang: 5      Loại file: pdf      Dung lượng: 52.34 KB      Lượt xem: 11      Lượt tải: 0    
10.10.2023

Phí tải xuống: miễn phí Tải xuống file đầy đủ (5 trang) 0
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Luồng byteByteArrayInputStream DataInputStream FileInputStream FilterInputStream InputStream ObjectInputStream PipedInputStream SequenceInputStream StringBufferInputStream6BufferedInputStream LineNumberInputStream PushbackInputStreamLuồng byteByteArrayOutputStream DataOutputStream FileOutputStream FilterOutputStream OutputStream ObjectOutputStream PipedOutputStream BufferedOutputStream PrintStream7Luồng nhập/xuất byte cơ bản• InputStream và OutputStream là hai lớp gốc của mọi luồng nhập/xuất byte (abstract).ObjectInputStreamOutputStream8Lớp InputStream• Một số phương thức của InputStream• abstract int read() throws IOException • Đọc một byte từ luồng. • Nếu cuối luồng sẽ trả về -1 • int read(byte[] b) throws IOException • Đọc một dãy byte từ luồng • void close() throws IOException • Đóng luồng nhập • int available() throws IOException • Trả về số byte có...
Nội dung trích xuất từ tài liệu:
Lập trình Java cơ bản : Luồng và xử lý file part 2 Luồng byte ByteArrayInputStream DataInputStream FileInputStream BufferedInputStream FilterInputStreamInputStream ObjectInputStream LineNumberInputStream PipedInputStream PushbackInputStream SequenceInputStream StringBufferInputStream 6 Luồng byte ByteArrayOutputStream DataOutputStream FileOutputStream BufferedOutputStream FilterOutputStreamOutputStream ObjectOutputStream PrintStream PipedOutputStream 7Luồng nhập/xuất byte cơ bản• InputStream và OutputStream là hai lớp gốc của mọi luồng nhập/xuất byte (abstract). Object InputStream OutputStream 8Lớp InputStream• Một số phương thức của InputStream • abstract int read() throws IOException • Đọc một byte từ luồng. • Nếu cuối luồng sẽ trả về -1 • int read(byte[] b) throws IOException • Đọc một dãy byte từ luồng • void close() throws IOException • Đóng luồng nhập • int available() throws IOException • Trả về số byte có thể đọc tiếp • long skip(long n) throws IOException • Bỏ qua n byte 9Lớp OutputStream• Một số phương thức của OutputStream • abstract void write(int b) throws IOException • Ghi một byte ra luồng • void write(byte[] b) throws IOException • Ghi một dãy byte ra luồng • void close() throws IOException • Đóng luồng • void flush() throws IOException • Dồn xuất luồng 10

Tài liệu được xem nhiều:

Gợi ý tài liệu liên quan: