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
| Name | Type | Access | Description |
|---|---|---|---|
size | int | Read | Gets the size of the data in the stream. |
buffer | byte[] | Read | Gets the buffer. |
length | long | Read | Gets the length of the data in the stream. |
outputStream | OutputStream | Read | Gets the output stream. |
inputStream | java.io.InputStream | Read | Gets the input stream. |
méthodes
| Signature | Description |
|---|---|
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() → int | Gets the size of the data in the stream. |
getBuffer() → byte[] | Gets the buffer. |
setCapacity(cap: int) | Sets the capacity of the stream. |
getLength() → long | Gets 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() → int | Reads a byte from the stream. |
read(buf: byte[]) → int | Reads bytes from the stream. |
read(buf: byte[], start: int, len: int) → int | Reads 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) → long | Seeks 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() → OutputStream | Returns the output stream. |
getInputStream() → java.io.InputStream | Creates a new file stream. |
Voir aussi
- Aspose.3D - référence API d’entreprise