- 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 EmptyStream
stream
-
方法概要
修饰符和类型 方法 说明 Writer
append(char c)
Writer
append(CharSequence csq)
Writer
append(CharSequence csq, int start, int end)
InputStream
asInputStream()
OutputStream
asOutputStream()
PrintStream
asPrintStream()
Reader
asReader()
Writer
asWriter()
void
close()
void
flush()
static EmptyStream
getInstance()
boolean
isOpen()
int
read(ByteBuffer dst)
boolean
readBoolean()
byte
readByte()
char
readChar()
double
readDouble()
float
readFloat()
void
readFully(@org.jetbrains.annotations.NotNull byte[] b)
void
readFully(@org.jetbrains.annotations.NotNull byte[] b, int off, int len)
int
readInt()
String
readLine()
long
readLong()
short
readShort()
int
readUnsignedByte()
int
readUnsignedShort()
@NotNull String
readUTF()
int
skipBytes(int n)
void
write(@org.jetbrains.annotations.NotNull byte[] b)
void
write(@org.jetbrains.annotations.NotNull byte[] b, int off, int len)
void
write(@org.jetbrains.annotations.NotNull char[] cbuf, int off, int len)
void
write(char[] cbuf)
void
write(int c)
void
write(String str)
void
write(String str, int off, int len)
int
write(ByteBuffer src)
void
writeBoolean(boolean v)
void
writeByte(int v)
void
writeBytes(@NotNull String s)
void
writeChar(int v)
void
writeChars(@NotNull String s)
void
writeDouble(double v)
void
writeFloat(float v)
void
writeInt(int v)
void
writeLong(long v)
void
writeShort(int v)
void
writeUTF(@NotNull String s)
-
从类继承的方法 java.io.Writer
nullWriter
-
-
-
-
字段详细资料
-
stream
public static final EmptyStream stream
-
-
方法详细资料
-
getInstance
public static EmptyStream getInstance()
-
write
public void write(@NotNull @org.jetbrains.annotations.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 @org.jetbrains.annotations.NotNull byte[] b) throws IOException
- 指定者:
write
在接口中DataOutput
- 抛出:
IOException
-
write
public void write(@NotNull @org.jetbrains.annotations.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 @NotNull String s) throws IOException
- 指定者:
writeBytes
在接口中DataOutput
- 抛出:
IOException
-
writeChars
public void writeChars(@NotNull @NotNull String s) throws IOException
- 指定者:
writeChars
在接口中DataOutput
- 抛出:
IOException
-
writeUTF
public void writeUTF(@NotNull @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 @org.jetbrains.annotations.NotNull byte[] b) throws IOException
- 指定者:
readFully
在接口中DataInput
- 抛出:
IOException
-
readFully
public void readFully(@NotNull @org.jetbrains.annotations.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 @NotNull String readUTF() throws IOException
- 指定者:
readUTF
在接口中DataInput
- 抛出:
IOException
-
-