博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
I/O流
阅读量:6614 次
发布时间:2019-06-24

本文共 2986 字,大约阅读时间需要 9 分钟。

OutputStream类型:

Subclasses:

, , , , , 

void ()
Closes this output stream and releases any system resources associated with this stream.
void ()
Flushes this output stream and forces any buffered output bytes to be written out.
void (byte[] b)
Writes 
b.length bytes from the specified byte array to this output stream.
void (byte[] b, int off, int len)
Writes 
len bytes from the specified byte array starting at offset 
off to this output stream.
abstract void (int b)
Writes the specified byte to this output stream.

 构造器:

( file)
Creates a file output stream to write to the file represented by the specified 
File object.
( file, boolean append)
Creates a file output stream to write to the file represented by the specified 
File object.
( fdObj)
Creates a file output stream to write to the specified file descriptor, which represents an existing connection to an actual file in the file system.
( name)
Creates a file output stream to write to the file with the specified name.
( name, boolean append)
Creates a file output stream to write to the file with the specified name.

InputStream类型:

 

int ()
Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream.
void ()
Closes this input stream and releases any system resources associated with the stream.
void (int readlimit)
Marks the current position in this input stream.
boolean ()
Tests if this input stream supports the 
mark and 
reset methods.
abstract int ()
Reads the next byte of data from the input stream.
int (byte[] b)
Reads some number of bytes from the input stream and stores them into the buffer array 
b.
int (byte[] b, int off, int len)
Reads up to 
len bytes of data from the input stream into an array of bytes.
void ()
Repositions this stream to the position at the time the 
mark method was last called on this input stream.
long (long n)
Skips over and discards 
n bytes of data from this input stream.

构造器:

( file)
Creates a 
FileInputStream by opening a connection to an actual file, the file named by the 
File object 
file in the file system.
( fdObj)
Creates a 
FileInputStream by using the file descriptor 
fdObj, which represents an existing connection to an actual file in the file system.
( name)

Writer 类:

public abstract class Writer extends implements , ,

(char c)
Appends the specified character to this writer.
( csq)
Appends the specified character sequence to this writer.
( csq, int start, int end)
Appends a subsequence of the specified character sequence to this writer.
abstract void ()
Closes the stream, flushing it first.
abstract void ()
Flushes the stream.
void (char[] cbuf)
Writes an array of characters.
abstract void (char[] cbuf, int off, int len)
Writes a portion of an array of characters.
void (int c)
Writes a single character.
void ( str)
Writes a string.
void ( str, int off, int len)
Writes a portion of a string.

转载于:https://www.cnblogs.com/ChuPengcheng/p/5978733.html

你可能感兴趣的文章
初探数据双向绑定
查看>>
Webpack4 不深不浅的实践教程
查看>>
3分钟搞掂Set集合
查看>>
win10下安装Docker
查看>>
Linux下常用的磁盘管理技术LVM
查看>>
Silverlight杂记之HTTP通信WebClient介绍
查看>>
动态路由协议之RIP配置详解
查看>>
nginx1.9+做TCP代理(端口转发)
查看>>
HTML元素的默认CSS设置介绍
查看>>
CSS-图片不变形设置
查看>>
Git异常:fatal: could not create work tree dir 'XXX': No such file or directory
查看>>
GNU make manual 翻译(八十二)
查看>>
python批量下载图片的三种方法
查看>>
/bin/bash^M: bad interpreter: 没有那个文件或目录
查看>>
apiCloud手动检测更新
查看>>
android中文api (59) —— TabHost.TabSpec
查看>>
动态生成WizardPage
查看>>
iOS - OC NSData 数据
查看>>
Java web 开发填坑记 1 -如何正确的下载 eclipse
查看>>
每日学习与工作计划移至日事清APP
查看>>