MemoryStream

Inheritance: java.lang.Object, com.aspose.threed.Stream

All Implemented Interfaces: java.lang.AutoCloseable

public class MemoryStream extends Stream implements AutoCloseable

由 lexchou 于 2017/6/13 创建。

构造函数

构造函数描述
MemoryStream()
MemoryStream(int capacity)
MemoryStream(byte[] data)

字段

字段描述
SEEK_CURRENT
SEEK_END
SEEK_SET

方法

方法描述
close()
copyTo(Stream stream)
copyTo(OutputStream stream)
equals(Object arg0)
flush()
getBuffer()
getClass()
getInputStream()
getLength()
getOutputStream()
getSize()
hashCode()
notify()
notifyAll()
read(byte[] buf)
read(byte[] buf, int start, int len)
read(ByteSpan bytes)
readByte()
seek(long offset, int seek)
setCapacity(int cap)将容量设置为指定值
setLength(long len)
toArray()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)
wrap(InputStream stream)
wrap(OutputStream stream)将 OutputStream 包装为 Stream,必须关闭该流以将数据刷新到输出流。
write(byte[] buf)
write(byte[] buf, int start, int len)
write(ByteSpan bytes)
writeByte(int b)

MemoryStream()

public MemoryStream()

MemoryStream(int capacity)

public MemoryStream(int capacity)

Parameters:

参数类型描述
容量int

MemoryStream(byte[] data)

public MemoryStream(byte[] data)

Parameters:

参数类型描述
数据byte[]

SEEK_CURRENT

public static final int SEEK_CURRENT

SEEK_END

public static final int SEEK_END

SEEK_SET

public static final int SEEK_SET

close()

public void close()

copyTo(Stream stream)

public void copyTo(Stream stream)

Parameters:

参数类型描述
streamStream

copyTo(OutputStream stream)

public void copyTo(OutputStream stream)

Parameters:

参数类型描述
java.io.OutputStream

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

参数类型描述
arg0java.lang.Object

Returns: 布尔

flush()

public void flush()

getBuffer()

public byte[] getBuffer()

Returns: byte[]

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getInputStream()

public InputStream getInputStream()

Returns: java.io.InputStream

getLength()

public long getLength()

Returns: long

getOutputStream()

public OutputStream getOutputStream()

Returns: java.io.OutputStream

getSize()

public int getSize()

Returns: int

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

read(byte[] buf)

public int read(byte[] buf)

Parameters:

参数类型描述
bufbyte[]

Returns: int

read(byte[] buf, int start, int len)

public int read(byte[] buf, int start, int len)

Parameters:

参数类型描述
bufbyte[]
开始int
lenint

Returns: int

read(ByteSpan bytes)

public int read(ByteSpan bytes)

Parameters:

参数类型描述
字节com.aspose.threed.ByteSpan

Returns: int

readByte()

public int readByte()

Returns: int

seek(long offset, int seek)

public long seek(long offset, int seek)

Parameters:

参数类型描述
偏移long
seekint

Returns: long

setCapacity(int cap)

public void setCapacity(int cap)

将容量设置为指定值

Parameters:

参数类型描述
capint内存流的新容量。

setLength(long len)

public void setLength(long len)

Parameters:

参数类型描述
lenlong

toArray()

public byte[] toArray()

Returns: byte[]

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

参数类型描述
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

参数类型描述
arg0long
arg1int

wrap(InputStream stream)

public static Stream wrap(InputStream stream)

Parameters:

参数类型描述
java.io.InputStream

Returns: Stream

wrap(OutputStream stream)

public static Stream wrap(OutputStream stream)

将 OutputStream 包装为 Stream,必须关闭该流以将数据刷新到输出流。

Parameters:

参数类型描述
java.io.OutputStream要包装的输出流

Returns: Stream - wrapped Stream instance

write(byte[] buf)

public void write(byte[] buf)

Parameters:

参数类型描述
bufbyte[]

write(byte[] buf, int start, int len)

public void write(byte[] buf, int start, int len)

Parameters:

参数类型描述
bufbyte[]
开始int
lenint

write(ByteSpan bytes)

public void write(ByteSpan bytes)

Parameters:

参数类型描述
字节com.aspose.threed.ByteSpan

writeByte(int b)

public void writeByte(int b)

Parameters:

参数类型描述
bint