Package com.onenetwork.platform.env
Class SharedStorageServiceResourceHelper
java.lang.Object
com.onenetwork.platform.env.SharedStorageServiceResourceHelper
public class SharedStorageServiceResourceHelper
extends java.lang.Object
Helper for manipulating
SharedStorageServiceResource
-
Constructor Summary
Constructors Constructor Description SharedStorageServiceResourceHelper()
-
Method Summary
Modifier and Type Method Description static java.lang.String
getContentAsString(SharedStorageServiceResource resource)
static byte[]
getContents(SharedStorageServiceResource resource)
static void
sortPathsByLastModifiedDate(java.util.List<SharedStorageServiceResource> paths)
Sorts the list ofSharedStorageServiceResource
by the last modified date in ascending order.static void
write(SharedStorageServiceResource resource, byte[] data, boolean append)
-
Constructor Details
-
SharedStorageServiceResourceHelper
public SharedStorageServiceResourceHelper()
-
-
Method Details
-
getContentAsString
public static java.lang.String getContentAsString(SharedStorageServiceResource resource) throws java.io.IOException- Parameters:
resource
-- Returns:
- content of the passed resource as
String
- Throws:
java.io.IOException
-
getContents
- Parameters:
resource
-- Returns:
- content of the passed resource as byte array
- Throws:
java.io.IOException
-
write
public static void write(SharedStorageServiceResource resource, byte[] data, boolean append) throws java.io.IOException- Parameters:
resource
-data
- content to be written to the resourceappend
- true to append the content- Throws:
java.io.IOException
-
sortPathsByLastModifiedDate
Sorts the list ofSharedStorageServiceResource
by the last modified date in ascending order. If two resources has same last modified date then resource name is used to sort.- Parameters:
paths
-
-