/** * Initialises this service's HTTP proxy with the given proxy settings. * * @param proxyHostAddress * @param proxyPort */ public static void initHttpProxy(HttpClient httpClient, String proxyHostAddress, int proxyPort, Jets3tProperties jets3tProperties) { initHttpProxy(httpClient, jets3tProperties, false, proxyHostAddress, proxyPort, null, null, null); }
/** * @param jets3tProperties * the object containing the properties that will be applied in the instance. * @return * a FileComparer instance. */ public static FileComparer getInstance(Jets3tProperties jets3tProperties) { return new FileComparer(jets3tProperties); }
/** * * @param key * @param data * @return HMAC SHA256 hash value. */ public static byte[] hmacSHA256(byte[] key, byte[] data) { return hmac(key, data, "SHA256"); }
private String formatBytesProgressWatcherDetails(BytesProgressWatcher watcher, boolean includeBytes) { long secondsRemaining = watcher.getRemainingTime(); String detailsText = (includeBytes ? byteFormatter.formatByteSize(watcher.getBytesTransferred()) + " of " + byteFormatter.formatByteSize(watcher.getBytesToTransfer()) + " - " : "") + "Time remaining: " + timeFormatterTerse.formatTime(secondsRemaining); return detailsText; }
/** * Return lowercase hex-encoded HMAC message digest of given data using the * given key, using a crypto hash like "SHA256". * * @param key * @param data * @return HMAC SHA256 hash value. */ public static byte[] hmacSHA256(String key, String data) { return hmac(stringToBytes(key), stringToBytes(data), "SHA256"); }
public static String generateS3HostnameForBucket(String bucketName, boolean isDnsBucketNamingDisabled, String s3Endpoint) { if (isBucketNameValidDNSName(bucketName) && !isDnsBucketNamingDisabled) { return bucketName + "." + s3Endpoint; } else { return s3Endpoint; } }
public static byte[] hashSHA256( InputStream dataIS, boolean resetInsteadOfClose) throws IOException { return hash(dataIS, "SHA-256", resetInsteadOfClose); }
/** * Constructs the XML SAX parser. * * @param properties the JetS3t properties that will be applied when parsing XML documents. * @throws S3ServiceException */ public CloudFrontXmlResponsesSaxParser(Jets3tProperties properties) throws ServiceException { this.properties = properties; this.xr = ServiceUtils.loadXMLReader(); }
protected HttpClient initHttpConnection() { return RestUtils.initHttpConnection( this, this.jets3tProperties, this.invokingApplicationDescription, this.credentialsProvider); }
public ClientConnectionManager newInstance(HttpParams params, SchemeRegistry schemeRegistry) { return new ThreadSafeConnManager(params, schemeRegistry); }
private String formatTransferDetails(ThreadWatcher watcher) { long bytesPerSecond = watcher.getBytesPerSecond(); String detailsText = byteFormatter.formatByteSize(bytesPerSecond) + "/s"; if (watcher.isTimeRemainingAvailable()) { long secondsRemaining = watcher.getTimeRemaining(); detailsText += " - Time remaining: " + timeFormatterTerse.formatTime(secondsRemaining); } return detailsText; }
/** * Return lowercase hex-encoded HMAC message digest of given data using the * given key, using a crypto hash like "SHA256". * * @param key * @param data * @return HMAC SHA256 hash value. */ public static byte[] hmacSHA256(String key, String data) { return hmac(stringToBytes(key), stringToBytes(data), "SHA256"); }
/** * Initialises this service's HTTP proxy by auto-detecting the proxy settings. */ public static void initHttpProxy(HttpClient httpClient, Jets3tProperties jets3tProperties) { initHttpProxy(httpClient, jets3tProperties, true, null, -1, null, null, null); }
/** * @param jets3tProperties * the object containing the properties that will be applied in the instance. * @return * a FileComparer instance. */ public static FileComparer getInstance(Jets3tProperties jets3tProperties) { return new FileComparer(jets3tProperties); }
/** * * @param key * @param data * @return HMAC SHA256 hash value. */ public static byte[] hmacSHA256(byte[] key, byte[] data) { return hmac(key, data, "SHA256"); }
public static byte[] hashSHA256( InputStream dataIS, boolean resetInsteadOfClose) throws IOException { return hash(dataIS, "SHA-256", resetInsteadOfClose); }
/** * Constructs the XML SAX parser. * * @param properties the JetS3t properties that will be applied when parsing XML documents. * @throws S3ServiceException */ public CloudFrontXmlResponsesSaxParser(Jets3tProperties properties) throws ServiceException { this.properties = properties; this.xr = ServiceUtils.loadXMLReader(); }
protected HttpClient initHttpConnection() { return RestUtils.initHttpConnection( this, this.jets3tProperties, this.invokingApplicationDescription, this.credentialsProvider); }
private String formatTransferDetails(ThreadWatcher watcher) { long bytesPerSecond = watcher.getBytesPerSecond(); String detailsText = byteFormatter.formatByteSize(bytesPerSecond) + "/s"; if (watcher.isTimeRemainingAvailable()) { long secondsRemaining = watcher.getTimeRemaining(); detailsText += " - Time remaining: " + timeFormatter.formatTime(secondsRemaining); } return detailsText; }
/** * Initialises this service's HTTP proxy by auto-detecting the proxy settings using the given endpoint. */ public static void initHttpProxy(HttpClient httpClient, Jets3tProperties jets3tProperties, String endpoint) { initHttpProxy(httpClient, jets3tProperties, true, null, -1, null, null, null, endpoint); }