Class ODClient
- java.lang.Object
-
- io.odilon.client.ODClient
-
- All Implemented Interfaces:
OdilonClient
public class ODClient extends Object implements OdilonClient
This class implements a simple Odilon Object Storage client.
Service
- Creating a bucket
- Listing buckets
Bucket
- Creating an object, including automatic multipart for large objects.
- Listing objects in a bucket
- Listing active multipart uploads
Object
- Removing an active multipart upload for a specific object and uploadId
- Read object metadata
- Reading an object
- Reading a range of bytes of an object
- Deleting an object
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CONNECTION_TIMEOUT
static String
DEFAULT_USER_AGENT
-
Constructor Summary
Constructors Constructor Description ODClient(String endpoint, int port, String accessKey, String secretKey)
By default the server has the following settings in fileodilon.properties
endpoint.ODClient(String endpoint, int port, String accessKey, String secretKey, boolean secure)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addServiceRequest(String requestClass)
void
createBucket(String bucketName)
bucketName length must be lower or equal toSharedConstant.MAX_BUCKET_CHARS
and match the regular expressionSharedConstant.bucket_valid_regex
(seeOdilonClient.isValidBucketName(java.lang.String)
)OffsetDateTime
created()
void
deleteAllBucketVersions(String bucketName)
Deletes all Objects' previous versions.void
deleteBucket(String bucketName)
Deletes a bucket.void
deleteObject(String bucketName, String objectName)
Removes an object from a bucket.void
deleteObjectAllVersions(String bucketName, String objectName)
boolean
existsBucket(String bucketName)
boolean
existsObject(String bucketName, String objectName)
Checks the existence of Object: bucketName, objectName
Note that if the bucket does not exist, the method does not throw an Exception, it returns falseio.odilon.model.Bucket
getBucket(String bucketName)
Returns theBucket
int
getChunk()
InputStream
getObject(String bucketName, String objectName)
Gets entire object's data asInputStream
in given bucket.void
getObject(String bucketName, String objectName, String fileName)
Gets object's data and stores it to given file name.protected com.fasterxml.jackson.databind.ObjectMapper
getObjectMapper()
io.odilon.model.ObjectMetadata
getObjectMetadata(String bucketName, String objectName)
ReturnsObjectMetadata
of given object in given bucket.io.odilon.model.ObjectMetadata
getObjectMetadataPreviousVersion(String bucketName, String objectName)
ReturnsObjectMetadata
of previous versionList<io.odilon.model.ObjectMetadata>
getObjectMetadataPreviousVersionAll(String bucketName, String objectName)
Returns all previous versions of an Object, sorted by version numberInputStream
getObjectPreviousVersion(String bucketName, String objectName)
InputStream
getObjectVersion(String bucketName, String objectName, int version)
get InputStream of the version passed as parameter, null if head is version 0 parameter is non existent or previous versions were wipedString
getPresignedObjectUrl(String bucketName, String objectName)
Returns an presigned URL to download the binary object with default expiry time.String
getPresignedObjectUrl(String bucketName, String objectName, Optional<Integer> expires)
A presigned URL is a way to grant temporary access to an Object, for example in an HTML webpage.String
getPresignedObjectUrl(String bucketName, String objectName, Optional<Integer> expires, Map<String,String> reqParams)
A presigned URL is a way to grant temporary access to an Object, for example in an HTML webpage.String
getUrl()
boolean
hasVersions(String bucketName, String objectName)
void
ignoreCertCheck()
Ignores check on server certificate for HTTPS connection.boolean
isEmpty(String bucketName)
boolean
isValidBucketName(String name)
Max length:SharedConstant.MAX_BUCKET_CHARS
Regular expression that must match:SharedConstant.bucket_valid_regex
boolean
isVersionControl()
List<io.odilon.model.Bucket>
listBuckets()
Returns all buckets, sorted alphabeticallyio.odilon.model.list.ResultSet<io.odilon.model.list.Item<io.odilon.model.ObjectMetadata>>
listObjects(io.odilon.model.Bucket bucket)
io.odilon.model.list.ResultSet<io.odilon.model.list.Item<io.odilon.model.ObjectMetadata>>
listObjects(String bucketName)
Item
is a wrapper for Lists and other Iterable structures of T where some elements may not be a T but an error.
T
must be Serializableio.odilon.model.list.ResultSet<io.odilon.model.list.Item<io.odilon.model.ObjectMetadata>>
listObjects(String bucketName, String prefix)
io.odilon.model.list.ResultSet<io.odilon.model.list.Item<io.odilon.model.ObjectMetadata>>
listObjects(String bucketName, Optional<String> prefix, Optional<Integer> pageSize)
Item <T>
is a wrapper for Lists and other iterable structures ofT
where some elements may not be aT
but an error.
T
must be Serializableio.odilon.model.MetricsValues
metrics()
MetricsValues
String
ping()
Returns the String "ok" or a String with the error reported by the Server.io.odilon.model.ObjectMetadata
putObject(String bucketName, String objectName, File file)
Uploads theFile
file to the serverio.odilon.model.ObjectMetadata
putObject(String bucketName, String objectName, InputStream stream, String fileName, String contentType)
Odilon stores objects using a flat structure of containers called Buckets.io.odilon.model.ObjectMetadata
putObjectStream(String bucketName, String objectName, InputStream stream, String fileName)
io.odilon.model.ObjectMetadata
putObjectStream(String bucketName, String objectName, InputStream stream, Optional<String> fileName, Optional<Long> size)
io.odilon.model.ObjectMetadata
putObjectStream(String bucketName, String objectName, InputStream stream, Optional<String> fileName, Optional<Long> size, Optional<String> contentType)
void
restoreObjectPreviousVersions(String bucketName, String objectName)
void
setChunk(int chunkSize)
void
setTimeout(long connectTimeout, long writeTimeout, long readTimeout)
Sets HTTP connect, write and read timeouts.io.odilon.model.SystemInfo
systemInfo()
System infoString
toJSON()
String
toString()
void
traceOff()
Disables HTTP call tracing previously enabled.void
traceOn(OutputStream traceStream)
======================================= DEBUG ==========================================protected void
transferTo(InputStream stream, String destFileName)
-
-
-
Field Detail
-
DEFAULT_CONNECTION_TIMEOUT
public static final int DEFAULT_CONNECTION_TIMEOUT
- See Also:
- Constant Field Values
-
DEFAULT_USER_AGENT
public static final String DEFAULT_USER_AGENT
-
-
Method Detail
-
getUrl
public String getUrl()
- Specified by:
getUrl
in interfaceOdilonClient
- Returns:
- server url (without the port)
-
putObjectStream
public io.odilon.model.ObjectMetadata putObjectStream(String bucketName, String objectName, InputStream stream, String fileName) throws ODClientException
- Specified by:
putObjectStream
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name- Returns:
- Throws:
ODClientException
-
putObjectStream
public io.odilon.model.ObjectMetadata putObjectStream(String bucketName, String objectName, InputStream stream, Optional<String> fileName, Optional<Long> size) throws ODClientException
- Specified by:
putObjectStream
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name- Returns:
- Throws:
ODClientException
-
putObjectStream
public io.odilon.model.ObjectMetadata putObjectStream(String bucketName, String objectName, InputStream stream, Optional<String> fileName, Optional<Long> size, Optional<String> contentType) throws ODClientException
- Specified by:
putObjectStream
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name- Returns:
- Throws:
ODClientException
-
putObject
public io.odilon.model.ObjectMetadata putObject(String bucketName, String objectName, File file) throws ODClientException
Uploads the
Example:File
file to the serverString endpoint = "http://localhost"; // default port int port = 9234; // default credentials String accessKey = "odilon"; String secretKey = "odilon"; String bucketName = "demo_bucket"; String objectName1 = "demo_object1"; String objectName2 = "demo_object2"; File file1 = new File("test1.pdf"); File file2 = new File("test2.pdf"); // put two objects in the bucket // the bucket must exist before sending the object, // and object names must be unique for that bucket OdilonClient client = new ODClient(endpoint, port, accessKey, secretKey); client.putObject(bucketName, objectName1, file1); client.putObject(bucketName, objectName2, file2);
- Specified by:
putObject
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name- Returns:
ObjectMetadata
of the Object created or updated- Throws:
ODClientException
-
putObject
public io.odilon.model.ObjectMetadata putObject(String bucketName, String objectName, InputStream stream, String fileName, String contentType) throws ODClientException
Description copied from interface:OdilonClient
Odilon stores objects using a flat structure of containers called Buckets. A bucket is like a folder, it just contains binary objects, potentially a very large number. Every object contained by a bucket has a unique ObjectName in that bucket; therefore, the pair BucketName + ObjectName is a Unique ID for each object in Odilon.
Uploading a File requires the Bucket to exist and the ObjectName to be unique for that bucket.
The Odilon client closes the
InputStream
after sending the data to the server. However, if anException
other thanODClientException
is thrown by this method, theInputStream
may not have been closed.Therefore callers must always attempt to close the
Example:Inputstream
File file = new File("test.pdf"); String bucketName = "bucket-demo"; String objectName = file.getName(); try (InputStream inputStream = new BufferedInputStream(new FileInputStream(file))){ client.putObjectStream(bucketName,objectName,inputStream,Optional.of(file.getName()),Optional.empty()); } catch (ODClientException e) { System.out.println(String.valueOf(e.getHttpStatus())+" " + e.getMessage() +" " + String.valueOf(e.getErrorCode())); } catch (FileNotFoundException | IOException e1) { System.out.println(e1.getMessage()); }
- Specified by:
putObject
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name- Returns:
ObjectMetadata
of the Object created or updated- Throws:
ODClientException
-
listObjects
public io.odilon.model.list.ResultSet<io.odilon.model.list.Item<io.odilon.model.ObjectMetadata>> listObjects(io.odilon.model.Bucket bucket) throws ODClientException
Description copied from interface:OdilonClient
- Specified by:
listObjects
in interfaceOdilonClient
- Returns:
- Throws:
ODClientException
-
listObjects
public io.odilon.model.list.ResultSet<io.odilon.model.list.Item<io.odilon.model.ObjectMetadata>> listObjects(String bucketName) throws ODClientException
Item
is a wrapper for Lists and other Iterable structures of T where some elements may not be a T but an error.
T
must be Serializabletry { ResultSet<Item <ObjectMetadata>> resultSet = client.listObjects(bucket.getName()); while (resultSet.hasNext()) { Item item = resultSet.next(); if (item.isOk()) System.out.println("ObjectName:" + item.getObject().objectName + " | file: " + item.getObject().fileName); else System.out.println(item.getErrorString()); } } catch (ODClientException e) { System.out.println(String.valueOf( e.getHttpStatus())+ " " + e.getMessage() + " " + String.valueOf(e.getErrorCode()) ); }
- Specified by:
listObjects
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket name- Returns:
- Throws:
ODClientException
-
listObjects
public io.odilon.model.list.ResultSet<io.odilon.model.list.Item<io.odilon.model.ObjectMetadata>> listObjects(String bucketName, String prefix) throws ODClientException
Description copied from interface:OdilonClient
- Specified by:
listObjects
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket name- Returns:
- Throws:
ODClientException
-
listObjects
public io.odilon.model.list.ResultSet<io.odilon.model.list.Item<io.odilon.model.ObjectMetadata>> listObjects(String bucketName, Optional<String> prefix, Optional<Integer> pageSize) throws ODClientException
Description copied from interface:OdilonClient
Item <T>
is a wrapper for Lists and other iterable structures ofT
where some elements may not be aT
but an error.
T
must be Serializabletry { ResultSet<Item <ObjectMetadata>> resultSet = client.listObjects(bucket.getName()); while (resultSet.hasNext()) { Item item = resultSet.next(); if (item.isOk()) System.out.println("ObjectName:" + item.getObject().objectName + " | file: " + item.getObject().fileName); else System.out.println(item.getErrorString()); } } catch (ODClientException e) { System.out.println(String.valueOf( e.getHttpStatus())+ " " + e.getMessage() + " " + String.valueOf(e.getErrorCode()) ); }
- Specified by:
listObjects
in interfaceOdilonClient
- Throws:
ODClientException
-
listBuckets
public List<io.odilon.model.Bucket> listBuckets() throws ODClientException
Returns all buckets, sorted alphabetically
Example:
List<Bucket> bucketList = odilonClient.listBuckets(); for (Bucket bucket : bucketList) { System.out.println(bucket.creationDate() + ", " + bucket.name()); }
- Specified by:
listBuckets
in interfaceOdilonClient
- Returns:
- List of buckets
- Throws:
ODClientException
-
getObjectMetadataPreviousVersionAll
public List<io.odilon.model.ObjectMetadata> getObjectMetadataPreviousVersionAll(String bucketName, String objectName) throws ODClientException
Returns all previous versions of an Object, sorted by version number
- Specified by:
getObjectMetadataPreviousVersionAll
in interfaceOdilonClient
- Returns:
- List of ObjectMetadata sorted by version number
- Throws:
ODClientException
-
isEmpty
public boolean isEmpty(String bucketName) throws ODClientException
- Specified by:
isEmpty
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket name- Returns:
- true if the bucket has no Objects
- Throws:
ODClientException
-
existsBucket
public boolean existsBucket(String bucketName) throws ODClientException
- Specified by:
existsBucket
in interfaceOdilonClient
- Returns:
- whether the bucket exists in the Server
- Throws:
ODClientException
-
getBucket
public io.odilon.model.Bucket getBucket(String bucketName) throws ODClientException
Description copied from interface:OdilonClient
Returns the
Bucket
- Specified by:
getBucket
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket name- Returns:
- Bucket
- Throws:
ODClientException
- if the Bucket does not exist the error codegetErrorCode()
returnsErrorCode.BUCKET_NOT_EXISTS
-
createBucket
public void createBucket(String bucketName) throws ODClientException
Description copied from interface:OdilonClient
bucketName length must be lower or equal to
Example:SharedConstant.MAX_BUCKET_CHARS
and match the regular expressionSharedConstant.bucket_valid_regex
(seeOdilonClient.isValidBucketName(java.lang.String)
)try { String bucketName = "bucket-demo"; // check if the bucket exists, if not create it if (client.existsBucket(bucketName)) System.out.println("bucket already exists ->" + bucketName ); else client.createBucket(bucketName); } catch (ODClientException e) { System.out.println( String.valueOf(e.getHttpStatus())+ " " + e.getMessage() + " " + String.valueOf(e.getErrorCode()) ); }
- Specified by:
createBucket
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket name- Throws:
ODClientException
- if the bucket already exists (error codeErrorCode.OBJECT_ALREADY_EXIST
)
-
addServiceRequest
public void addServiceRequest(String requestClass) throws ODClientException
- Specified by:
addServiceRequest
in interfaceOdilonClient
- Throws:
ODClientException
-
deleteBucket
public void deleteBucket(String bucketName) throws ODClientException
Description copied from interface:OdilonClient
Deletes a bucket. The bucket must be empty to be deleted
- Specified by:
deleteBucket
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket name- Throws:
ODClientException
-
Bucket does not exist ->ODHttpStatus.NOT_FOUND
with error codeErrorCode.BUCKET_NOT_EXISTS
Bucket is not empty ->with error code {@link ErrorCode.BUCKET_NOT_EMPTY}
-
deleteObject
public void deleteObject(String bucketName, String objectName) throws ODClientException
Removes an object from a bucket.
Example:
odilonClient.deleteObject("my-bucketname", "my-objectname");
- Specified by:
deleteObject
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name in the bucket- Throws:
ODClientException
-
deleteObjectAllVersions
public void deleteObjectAllVersions(String bucketName, String objectName) throws ODClientException
- Specified by:
deleteObjectAllVersions
in interfaceOdilonClient
- Throws:
ODClientException
-
restoreObjectPreviousVersions
public void restoreObjectPreviousVersions(String bucketName, String objectName) throws ODClientException
- Specified by:
restoreObjectPreviousVersions
in interfaceOdilonClient
- Throws:
ODClientException
-
deleteAllBucketVersions
public void deleteAllBucketVersions(String bucketName) throws ODClientException
Description copied from interface:OdilonClient
Deletes all Objects' previous versions. It does not delete the current version (called head version).
This method is sometimes used to free disk in the serverThe method returns immediately after sending the command to the server. The command is processed asynchronously in the server.
- Specified by:
deleteAllBucketVersions
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket name- Throws:
ODClientException
-
Bucket does not exist ->ODHttpStatus.NOT_FOUND
with error codeErrorCode.BUCKET_NOT_EXISTS
Server does not have Version Control enabled ->ODHttpStatus.METHOD_NOT_ALLOWED
with error codeErrorCode.API_NOT_ENABLED
Version Control not enabled
-
systemInfo
public io.odilon.model.SystemInfo systemInfo() throws ODClientException
System info
- Specified by:
systemInfo
in interfaceOdilonClient
- Returns:
- Throws:
ODClientException
-
isVersionControl
public boolean isVersionControl() throws ODClientException
- Specified by:
isVersionControl
in interfaceOdilonClient
- Returns:
- true if the server has version control enabled
- Throws:
ODClientException
-
metrics
public io.odilon.model.MetricsValues metrics() throws ODClientException
Description copied from interface:OdilonClient
MetricsValues
- Specified by:
metrics
in interfaceOdilonClient
- Returns:
- Throws:
ODClientException
-
ping
public String ping()
Returns the String "ok" or a String with the error reported by the Server. If the client can not connect to the Server, the method returns a message "can not connect"
Example:
{@code String pingResult = odilonClient.ping(); if (!pingResult.equals("ok")) { System.out.println( "Server error -> " + pingResult)); }
- Specified by:
ping
in interfaceOdilonClient
- Returns:
- String "ok" or the error reported by the Server.
-
getPresignedObjectUrl
public String getPresignedObjectUrl(String bucketName, String objectName, Optional<Integer> expires, Map<String,String> reqParams) throws ODClientException
A presigned URL is a way to grant temporary access to an Object, for example in an HTML webpage. It remains valid for a limited period of time which is specified when the URL is generated.
- Throws:
ODClientException
-
getPresignedObjectUrl
public String getPresignedObjectUrl(String bucketName, String objectName, Optional<Integer> expires) throws ODClientException
A presigned URL is a way to grant temporary access to an Object, for example in an HTML webpage. It remains valid for a limited period of time which is specified when the URL is generated.
- Specified by:
getPresignedObjectUrl
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object nameexpires
- duration in seconds for the url to be valid- Returns:
- temporary url to download the file without authentication
- Throws:
ODClientException
-
getPresignedObjectUrl
public String getPresignedObjectUrl(String bucketName, String objectName) throws ODClientException
Returns an presigned URL to download the binary object with default expiry time.
Default expiry time is 7 days in seconds.- Specified by:
getPresignedObjectUrl
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name- Returns:
- Throws:
ODClientException
-
existsObject
public boolean existsObject(String bucketName, String objectName) throws ODClientException, IOException
Description copied from interface:OdilonClient
Checks the existence of Object: bucketName, objectName
Note that if the bucket does not exist, the method does not throw an Exception, it returns false- Specified by:
existsObject
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name- Returns:
- true if the Object exist
- Throws:
ODClientException
IOException
-
hasVersions
public boolean hasVersions(String bucketName, String objectName) throws ODClientException, IOException
- Specified by:
hasVersions
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name- Returns:
true
if the Object has more versions than the head version (ie. the head version must be greater than 0)- Throws:
ODClientException
IOException
-
getObjectMetadata
public io.odilon.model.ObjectMetadata getObjectMetadata(String bucketName, String objectName) throws ODClientException
Returns
ObjectMetadata
of given object in given bucket.Example:
ObjectMetadata meta = odilonClient.getObjectMetadata("my-bucketname", "my-objectname"); System.out.println(meta.toString()));
- Specified by:
getObjectMetadata
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name in the bucket- Returns:
- Throws:
ODClientException
-
getObjectMetadataPreviousVersion
public io.odilon.model.ObjectMetadata getObjectMetadataPreviousVersion(String bucketName, String objectName) throws ODClientException
Returns
ObjectMetadata
of previous versionExample:
ObjectMetadata meta = odilonClient.getObjectMetadata("my-bucketname", "my-objectname"); System.out.println(meta.toString()));
- Specified by:
getObjectMetadataPreviousVersion
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket name.objectName
- Object name in the bucket.- Throws:
ODClientException
-
getObject
public InputStream getObject(String bucketName, String objectName) throws ODClientException
Gets entire object's data as
Example:InputStream
in given bucket. The InputStream must be closed after use else the connection will remain open.InputStream stream = OdilonClient.getObject("my-bucketname", "my-objectname"); byte[] buf = new byte[16384]; int bytesRead; while ((bytesRead = stream.read(buf, 0, buf.length)) >= 0) { System.out.println(new String(buf, 0, bytesRead)); } stream.close();
- Specified by:
getObject
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket nameobjectName
- Object name in the bucket- Returns:
InputStream
containing the object data.- Throws:
ODClientException
-
getObjectPreviousVersion
public InputStream getObjectPreviousVersion(String bucketName, String objectName) throws ODClientException
- Specified by:
getObjectPreviousVersion
in interfaceOdilonClient
- Throws:
ODClientException
-
getObjectVersion
public InputStream getObjectVersion(String bucketName, String objectName, int version) throws ODClientException
get InputStream of the version passed as parameter, null if head is version 0 parameter is non existent or previous versions were wiped
- Specified by:
getObjectVersion
in interfaceOdilonClient
- Throws:
ODClientException
-
getObject
public void getObject(String bucketName, String objectName, String fileName) throws ODClientException, IOException
Gets object's data and stores it to given file name.
Example:
odilonClient.getObject("my-bucketname", "my-objectname", "photo.jpg");
- Specified by:
getObject
in interfaceOdilonClient
- Parameters:
bucketName
- Bucket name.objectName
- Object name in the bucket.fileName
- file name.- Throws:
ODClientException
IOException
-
setTimeout
public void setTimeout(long connectTimeout, long writeTimeout, long readTimeout)
Sets HTTP connect, write and read timeouts. A value of 0 means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE when converted to milliseconds.
Example:
odilonClient.setTimeout(TimeUnit.SECONDS.toMillis(10), TimeUnit.SECONDS.toMillis(10), TimeUnit.SECONDS.toMillis(30));
- Specified by:
setTimeout
in interfaceOdilonClient
- Parameters:
connectTimeout
- HTTP connect timeout in milliseconds.writeTimeout
- HTTP write timeout in milliseconds.readTimeout
- HTTP read timeout in milliseconds.
-
ignoreCertCheck
public void ignoreCertCheck() throws NoSuchAlgorithmException, KeyManagementException
Ignores check on server certificate for HTTPS connection.
Example:
odilonClient.ignoreCertCheck();
-
isValidBucketName
public boolean isValidBucketName(String name)
Description copied from interface:OdilonClient
- Max length:
SharedConstant.MAX_BUCKET_CHARS
- Regular expression that must match:
SharedConstant.bucket_valid_regex
- Specified by:
isValidBucketName
in interfaceOdilonClient
- Parameters:
name
- Bucket name- Returns:
- whether the bucketName is a valid Odilon bucket name
- Max length:
-
traceOn
public void traceOn(OutputStream traceStream)
Description copied from interface:OdilonClient
======================================= DEBUG ==========================================- Specified by:
traceOn
in interfaceOdilonClient
-
traceOff
public void traceOff() throws IOException
Disables HTTP call tracing previously enabled.
- Specified by:
traceOff
in interfaceOdilonClient
- Throws:
IOException
- upon connection error- See Also:
traceOn(java.io.OutputStream)
-
toJSON
public String toJSON()
-
created
public OffsetDateTime created()
-
setChunk
public void setChunk(int chunkSize)
-
getChunk
public int getChunk()
-
transferTo
protected void transferTo(InputStream stream, String destFileName) throws IOException
- Throws:
IOException
-
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-
-