public class ByteArrayResource extends AbstractResource
Constructor and Description |
---|
ByteArrayResource(String mimetype,
byte[] bytes)
Creates a new ByteArrayResource which provides access to the given byte
array.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
asStream()
Returns an InputStream which reads the contents of this resource,
starting with the first byte.
|
getLastModified, getMimeType
public ByteArrayResource(String mimetype, byte[] bytes)
mimetype
- The mimetype of the resource.bytes
- The bytes that this resource should contain.public InputStream asStream()
Resource
Copyright © 2016. All rights reserved.