public class ResourceConcatenator extends Object
| Constructor and Description |
|---|
ResourceConcatenator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendPropertyResource(OutputStream outputStream,
File propertyResource)
Append the property resource to the output stream
|
protected void |
appendResource(OutputStream outputStream,
ResourceDescriptor descriptor,
String minimizedSuffix)
Append the resource to the output stream
|
void |
concatenateResources(File cacheDir,
String fileName,
List<ResourceDescriptor> resourcesToConcatenate,
File propertyResource,
String minimizedSuffix)
Concatenate the provided resources and write the result to the given file
|
protected File |
getFile(ResourceDescriptor descriptor,
String minimizedSuffix)
Get the file of the resource to append.
|
protected void appendPropertyResource(OutputStream outputStream, File propertyResource) throws IOException
outputStream - the stream to write topropertyResource - the cached file of the property resource that contains the property value or the
fallback. If null nothing is appended.IOException - in case appending failedprotected void appendResource(OutputStream outputStream, ResourceDescriptor descriptor, String minimizedSuffix) throws IOException
outputStream - the stream to write todescriptor - the descriptor of the resource to appendminimizedSuffix - the suffix marking the minimized version of a resource or null if the not
minimized files should be concatenatedIOException - in case appending failedpublic void concatenateResources(File cacheDir, String fileName, List<ResourceDescriptor> resourcesToConcatenate, File propertyResource, String minimizedSuffix) throws IOException
cacheDir - the directory to store the file infileName - the name of the file to write toresourcesToConcatenate - the resources to concatenatepropertyResource - the property resource of the category, can be nullminimizedSuffix - the suffix marking the minimized version of a resource or null if the not
minimized files should be concatenatedIOException - in case the concatenation failedprotected File getFile(ResourceDescriptor descriptor, String minimizedSuffix)
descriptor - the descriptor of the resource to appendminimizedSuffix - the suffix marking the minimized version of a resource or null if the not
minimized files should be concatenatedCopyright © 2019 Communote team. All rights reserved.