类 EmptyStream
- java.lang.Object
-
- java.io.Writer
-
- cn.mcres.karlatemp.mxlib.tools.EmptyStream
-
- 所有已实现的接口:
Closeable,DataInput,DataOutput,Flushable,Appendable,AutoCloseable,Channel,ReadableByteChannel,WritableByteChannel
public class EmptyStream extends Writer implements ReadableByteChannel, WritableByteChannel, Appendable, DataInput, DataOutput
一个完全空的IO流- 作者:
- Karlatemp
-
-
字段概要
字段 修饰符和类型 字段 说明 static EmptyStreamstream
-
方法概要
修饰符和类型 方法 说明 Writerappend(char c)Writerappend(CharSequence csq)Writerappend(CharSequence csq, int start, int end)InputStreamasInputStream()OutputStreamasOutputStream()PrintStreamasPrintStream()ReaderasReader()WriterasWriter()voidclose()voidflush()static EmptyStreamgetInstance()booleanisOpen()intread(ByteBuffer dst)booleanreadBoolean()bytereadByte()charreadChar()doublereadDouble()floatreadFloat()voidreadFully(byte[] b)voidreadFully(byte[] b, int off, int len)intreadInt()StringreadLine()longreadLong()shortreadShort()intreadUnsignedByte()intreadUnsignedShort()StringreadUTF()intskipBytes(int n)voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(char[] cbuf)voidwrite(char[] cbuf, int off, int len)voidwrite(int c)voidwrite(String str)voidwrite(String str, int off, int len)intwrite(ByteBuffer src)voidwriteBoolean(boolean v)voidwriteByte(int v)voidwriteBytes(String s)voidwriteChar(int v)voidwriteChars(String s)voidwriteDouble(double v)voidwriteFloat(float v)voidwriteInt(int v)voidwriteLong(long v)voidwriteShort(int v)voidwriteUTF(String s)-
从类继承的方法 java.io.Writer
nullWriter
-
-
-
-
字段详细资料
-
stream
public static final EmptyStream stream
-
-
方法详细资料
-
getInstance
public static EmptyStream getInstance()
-
write
public void write(@NotNull char[] cbuf, int off, int len) throws IOException- 指定者:
write在类中Writer- 抛出:
IOException
-
asWriter
public Writer asWriter()
- 返回:
- The empty writer
- 从以下版本开始:
- 2.8
-
asReader
public Reader asReader()
-
asInputStream
public InputStream asInputStream()
-
asOutputStream
public OutputStream asOutputStream()
-
read
public int read(ByteBuffer dst)
- 指定者:
read在接口中ReadableByteChannel
-
close
public void close()
-
write
public int write(ByteBuffer src)
- 指定者:
write在接口中WritableByteChannel
-
append
public Writer append(CharSequence csq) throws IOException
- 指定者:
append在接口中Appendable- 覆盖:
append在类中Writer- 抛出:
IOException
-
append
public Writer append(CharSequence csq, int start, int end) throws IOException
- 指定者:
append在接口中Appendable- 覆盖:
append在类中Writer- 抛出:
IOException
-
append
public Writer append(char c) throws IOException
- 指定者:
append在接口中Appendable- 覆盖:
append在类中Writer- 抛出:
IOException
-
flush
public void flush() throws IOException- 指定者:
flush在接口中Flushable- 指定者:
flush在类中Writer- 抛出:
IOException
-
write
public void write(int c) throws IOException- 指定者:
write在接口中DataOutput- 覆盖:
write在类中Writer- 抛出:
IOException
-
write
public void write(@NotNull byte[] b) throws IOException- 指定者:
write在接口中DataOutput- 抛出:
IOException
-
write
public void write(@NotNull byte[] b, int off, int len) throws IOException- 指定者:
write在接口中DataOutput- 抛出:
IOException
-
writeBoolean
public void writeBoolean(boolean v) throws IOException- 指定者:
writeBoolean在接口中DataOutput- 抛出:
IOException
-
writeByte
public void writeByte(int v) throws IOException- 指定者:
writeByte在接口中DataOutput- 抛出:
IOException
-
writeShort
public void writeShort(int v) throws IOException- 指定者:
writeShort在接口中DataOutput- 抛出:
IOException
-
writeChar
public void writeChar(int v) throws IOException- 指定者:
writeChar在接口中DataOutput- 抛出:
IOException
-
writeInt
public void writeInt(int v) throws IOException- 指定者:
writeInt在接口中DataOutput- 抛出:
IOException
-
writeLong
public void writeLong(long v) throws IOException- 指定者:
writeLong在接口中DataOutput- 抛出:
IOException
-
writeFloat
public void writeFloat(float v) throws IOException- 指定者:
writeFloat在接口中DataOutput- 抛出:
IOException
-
writeDouble
public void writeDouble(double v) throws IOException- 指定者:
writeDouble在接口中DataOutput- 抛出:
IOException
-
writeBytes
public void writeBytes(@NotNull String s) throws IOException- 指定者:
writeBytes在接口中DataOutput- 抛出:
IOException
-
writeChars
public void writeChars(@NotNull String s) throws IOException- 指定者:
writeChars在接口中DataOutput- 抛出:
IOException
-
writeUTF
public void writeUTF(@NotNull String s) throws IOException- 指定者:
writeUTF在接口中DataOutput- 抛出:
IOException
-
write
public void write(char[] cbuf) throws IOException- 覆盖:
write在类中Writer- 抛出:
IOException
-
write
public void write(String str) throws IOException
- 覆盖:
write在类中Writer- 抛出:
IOException
-
write
public void write(String str, int off, int len) throws IOException
- 覆盖:
write在类中Writer- 抛出:
IOException
-
asPrintStream
public PrintStream asPrintStream()
-
readFully
public void readFully(@NotNull byte[] b) throws IOException- 指定者:
readFully在接口中DataInput- 抛出:
IOException
-
readFully
public void readFully(@NotNull byte[] b, int off, int len) throws IOException- 指定者:
readFully在接口中DataInput- 抛出:
IOException
-
skipBytes
public int skipBytes(int n) throws IOException- 指定者:
skipBytes在接口中DataInput- 抛出:
IOException
-
readBoolean
public boolean readBoolean() throws IOException- 指定者:
readBoolean在接口中DataInput- 抛出:
IOException
-
readByte
public byte readByte() throws IOException- 指定者:
readByte在接口中DataInput- 抛出:
IOException
-
readUnsignedByte
public int readUnsignedByte() throws IOException- 指定者:
readUnsignedByte在接口中DataInput- 抛出:
IOException
-
readShort
public short readShort() throws IOException- 指定者:
readShort在接口中DataInput- 抛出:
IOException
-
readUnsignedShort
public int readUnsignedShort() throws IOException- 指定者:
readUnsignedShort在接口中DataInput- 抛出:
IOException
-
readChar
public char readChar() throws IOException- 指定者:
readChar在接口中DataInput- 抛出:
IOException
-
readInt
public int readInt() throws IOException- 指定者:
readInt在接口中DataInput- 抛出:
IOException
-
readLong
public long readLong() throws IOException- 指定者:
readLong在接口中DataInput- 抛出:
IOException
-
readFloat
public float readFloat() throws IOException- 指定者:
readFloat在接口中DataInput- 抛出:
IOException
-
readDouble
public double readDouble() throws IOException- 指定者:
readDouble在接口中DataInput- 抛出:
IOException
-
readLine
public String readLine() throws IOException
- 指定者:
readLine在接口中DataInput- 抛出:
IOException
-
readUTF
@NotNull public String readUTF() throws IOException
- 指定者:
readUTF在接口中DataInput- 抛出:
IOException
-
-