MemoryStream

Vue de l’ensemble

‘MemoryStream’ est une classe dans Aspose.3D FOSS pour Java. hérite de: ‘Streum’, ‘AutoCloseable’.

Résumé : Mémorisation pour lire et écrire des données dans la mémoire.

Cette classe fournit 23 méthodes pour travailler avec des objets MemoryStream dans les programmes Java. Les méthodologies disponibles comprennent: ‘Memory Stream’, ‘Streum’, close', ‘copyTo', ’flush’, 'getBuffer', ‚getInputStreama', ''getLength', ‘’getOutputStram, ‘‘GetSize , ''read et 6 méthode supplémentaires. Tous les membres publics sont accessibles à toute application Java après l’installation de l’Aspose.3D FOSS pour le package Java . Propriétés : ‘buffer ; 'inputstream' ; longueur, 'output Streama; ‘size’.

Propriétés

NameTypeAccessDescription
sizeintReadGets the size of the data in the stream.
bufferbyte[]ReadGets the buffer.
lengthlongReadGets the length of the data in the stream.
outputStreamOutputStreamReadGets the output stream.
inputStreamjava.io.InputStreamReadGets the input stream.

méthodes

SignatureDescription
MemoryStream()Creates a new memory stream with default capacity.
MemoryStream(capacity: int)Creates a new memory stream with specified capacity.
MemoryStream(data: byte[])Creates a new memory stream from existing data.
getSize()intGets the size of the data in the stream.
getBuffer()byte[]Gets the buffer.
setCapacity(cap: int)Sets the capacity of the stream.
getLength()longGets the length of the data in the stream.
setLength(len: long)Sets the length of the stream.
flush()Flushes the stream (no-op for memory stream).
readByte()intReads a byte from the stream.
read(buf: byte[])intReads bytes from the stream.
read(buf: byte[], start: int, len: int)intReads bytes from the stream.
write(buf: byte[])Writes bytes to the stream.
write(buf: byte[], start: int, len: int)Writes bytes to the stream.
writeByte(b: int)Writes a byte to the stream.
seek(offset: long, seek: int)longSeeks to a position in the stream.
toArray()byte[]Converts the stream to an array.
close()Closes the stream.
copyTo(stream: Stream)Copies the stream content to another stream.
copyTo(stream: OutputStream)Copies the stream content to an output stream.
Stream(in: InputStream)File stream for reading and writing files.
getOutputStream()OutputStreamReturns the output stream.
getInputStream()java.io.InputStreamCreates a new file stream.

Voir aussi

  • Aspose.3D - référence API d’entreprise
 Français