public class ByteArrayContentStream extends java.lang.Object implements ContentStreamSafe
Constructor and Description |
---|
ByteArrayContentStream(byte[] data)
Constructor specifying the underlying data as an array of bytes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
Return true if the stream can be read currently.
|
ContentInputStream |
getContentInputStream()
Returns the underlying content stream, giving access to the real
InputStream and its size.
|
java.io.InputStream |
getStream()
Gets the underlying input stream.
|
long |
getStreamLength()
Gets the size of the underlying input stream in bytes.
|
public ByteArrayContentStream(byte[] data)
data
- the underlying datapublic java.io.InputStream getStream()
ContentStream
getStream
in interface ContentStream
public long getStreamLength()
ContentStream
getStreamLength
in interface ContentStream
public ContentInputStream getContentInputStream() throws java.io.IOException
ContentStreamSafe
getContentInputStream
in interface ContentStreamSafe
java.io.IOException
- upon I/O error.public boolean canRead()
ContentStreamSafe
canRead
in interface ContentStreamSafe
Copyright © 2021 Dassault Systèmes, All Rights Reserved.