Resource
public class ByteArrayResource extends Object implements Resource
Constructor | Description |
---|---|
ByteArrayResource(String location,
byte[] bytes) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
Stream<String> |
getAllLocations() |
Get all locations.
|
byte[] |
getBytes() |
Get the byte-array.
|
URL |
getResource(String location) |
Get the resource.
|
InputStream |
getResourceAsStream(String location) |
Get the resource as a stream.
|
public ByteArrayResource(String location, byte[] bytes)
location
- the location.bytes
- the byte-array.public Stream<String> getAllLocations()
getAllLocations
in interface Resource
public byte[] getBytes()
public URL getResource(String location)
getResource
in interface Resource
location
- the location.public InputStream getResourceAsStream(String location)
getResourceAsStream
in interface Resource
location
- the location.Copyright © 2020 Piranha Cloud. All rights reserved.