Class WebResource.LazyWebResource
java.lang.Object
com.djrapitops.plan.delivery.web.resource.WebResource.LazyWebResource
- All Implemented Interfaces:
WebResource
- Enclosing interface:
- WebResource
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.djrapitops.plan.delivery.web.resource.WebResource
WebResource.ByteResource, WebResource.LazyWebResource
-
Constructor Summary
ConstructorDescriptionLazyWebResource
(Supplier<InputStream> inputStreamSupplier, Supplier<byte[]> contentSupplier, Long lastModified) -
Method Summary
-
Constructor Details
-
LazyWebResource
public LazyWebResource(Supplier<InputStream> inputStreamSupplier, Supplier<byte[]> contentSupplier, Long lastModified)
-
-
Method Details
-
asBytes
public byte[] asBytes()- Specified by:
asBytes
in interfaceWebResource
-
asString
Description copied from interface:WebResource
Return the resource as a UTF-8 String.- Specified by:
asString
in interfaceWebResource
- Returns:
- The resource in UTF-8.
-
asStream
- Specified by:
asStream
in interfaceWebResource
-
getLastModified
- Specified by:
getLastModified
in interfaceWebResource
-