Tabnine Logo
com.amazonaws.util
Code IndexAdd Tabnine to your IDE (free)

How to use com.amazonaws.util

Best Java code snippets using com.amazonaws.util (Showing top 20 results out of 1,863)

origin: aws/aws-sdk-java

private ExecutionContext(final Builder builder) {
  this.requestHandler2s = builder.requestHandler2s;
  this.awsRequestMetrics = builder.useRequestMetrics ? new AWSRequestMetricsFullSupport() : new AWSRequestMetrics();
  this.awsClient = builder.awsClient;
  this.signerProvider = builder.signerProvider;
}
origin: aws/aws-sdk-java

/**
 * Returns a base 32 encoded string of the given bytes.
 */
public static String encodeAsString(byte ... bytes) {
  if (bytes == null)
    return null;
  return bytes.length == 0 ? "" : CodecUtils.toStringDirect(codec.encode(bytes)); 
}

origin: aws/aws-sdk-java

  /**
   * Returns the MD5 in base64 for the given file.
   */
  public static String md5AsBase64(File file) throws FileNotFoundException, IOException {
    return Base64.encodeAsString(computeMD5Hash(file));
  }
}
origin: aws/aws-sdk-java

public static Date parseRfc822Date(String dateString) {
  if (StringUtils.isNullOrEmpty(dateString)) {
    return null;
  }
  return DateUtils.parseRFC822Date(dateString);
}
origin: aws/aws-sdk-java

/**
 * Adds the specified value as Base64 encoded text to the current position of the in
 * progress XML document.
 *
 * @param b
 *            The binary data to add to the XML document.
 *
 * @return This XMLWriter so that additional method calls can be chained
 *         together.
 */
public XMLWriter value(ByteBuffer b) {
  append(escapeXMLEntities(Base64.encodeAsString(BinaryUtils.copyBytesFrom(b))));
  return this;
}
origin: aws/aws-sdk-java

/**
 * Base64 encodes the data in the specified byte buffer (from the current
 * position to the buffer's limit) and returns it as a base64 encoded
 * string.
 *
 * @param byteBuffer
 *            The data to base64 encode and return as a string; must not be
 *            null.
 *
 * @return The base64 encoded contents of the specified byte buffer.
 */
public static String fromByteBuffer(ByteBuffer byteBuffer) {
  return Base64.encodeAsString(copyBytesFrom(byteBuffer));
}
origin: aws/aws-sdk-java

  @Override
  public String toString() {
    return Base64.encodeAsString(value);
  }
}
origin: aws/aws-sdk-java

public RetryRule(int maxRetryAttempts, long delay, TimeUnit timeUnit) {
  this.maxRetryAttempts = maxRetryAttempts;
  this.delay = delay;
  this.timeUnit = ValidationUtils.assertNotNull(timeUnit, "timeUnit");
}
origin: aws/aws-sdk-java

/**
 * Returns a base 16 encoded string (in lower case) of the given bytes.
 */
public static String encodeAsString(byte ... bytes) {
  if (bytes == null)
    return null;
  return bytes.length == 0 ? "" : CodecUtils.toStringDirect(codec.encode(bytes));
}
origin: aws/aws-sdk-java

/**
 * This constructor should be used only in the case when AWS SDK metrics
 * collector is disabled, when minimal timing info is supported for backward
 * compatibility reasons.
 *
 * @see AWSRequestMetricsFullSupport
 */
public AWSRequestMetrics() {
  this.timingInfo = TimingInfo.startTiming();
}
origin: aws/aws-sdk-java

public EqualJitterBackoffStrategy(final int baseDelay,
                 final int maxBackoffTime) {
  this.baseDelay = ValidationUtils.assertIsPositive(baseDelay, "Base delay");
  this.maxBackoffTime = ValidationUtils.assertIsPositive(maxBackoffTime, "Max backoff");
}
origin: aws/aws-sdk-java

/** Fluent API of {@link #incrementCounter(String)} */
public final AWSRequestMetrics incrementCounterWith(String event) {
  incrementCounter(event);
  return this;
}
/** Fluent API of {@link #incrementCounter(MetricType)} */
origin: aws/aws-sdk-java

public JavaVersion(final Integer majorVersionFamily, final Integer majorVersion,
    final Integer maintenanceNumber, final Integer updateNumber) {
  this.majorVersionFamily = majorVersionFamily;
  this.majorVersion = majorVersion;
  this.maintenanceNumber = maintenanceNumber;
  this.updateNumber = updateNumber;
  this.knownVersion = KnownJavaVersions.fromMajorVersion(majorVersionFamily, majorVersion);
  this.tokenizedVersion = this.getTokenizedVersion();
}
origin: aws/aws-sdk-java

/**
 * Get the public key. Only available if supplied at instance launch time.
 */
public static String getPublicKey() {
  return fetchData(EC2_METADATA_ROOT + "/public-keys/0/openssh-key");
}
origin: aws/aws-sdk-java

/**
 * Override the default header timestamp format for input type because we have always marshalled header value as ISO_8601, changing it to
 * rfc822 might break existing customers who are relying on that behavior. If not configured, we set it to UNKNOWN and let HeaderMarshallers.DATE
 * to set the default format.
 */
@Override
protected String defaultHeaderTimestamp() {
  return TimestampFormat.UNKNOWN.getFormat();
}
origin: aws/aws-sdk-java

/**
 * Converts a Hex-encoded data string to the original byte data.
 *
 * @param hexData
 *            hex-encoded data to decode.
 * @return decoded data from the hex string.
 */
public static byte[] fromHex(String hexData) {
  return Base16Lower.decode(hexData);
}
origin: aws/aws-sdk-java

@Override
public int hashCode() {
  int hash = HASH_SEED;
  hash = hashCode(hash, this.name);
  hash = hashCode(hash, this.value);
  return hash;
}
origin: aws/aws-sdk-java

/**
 * Returns the MD5 in base64 for the data from the given input stream.
 * Note this method closes the given input stream upon completion.
 */
public static String md5AsBase64(InputStream is) throws IOException {
  return Base64.encodeAsString(computeMD5Hash(is));
}
origin: aws/aws-sdk-java

/**
 * Returns a base 16 encoded string (in upper case) of the given bytes.
 */
public static String encodeAsString(byte ... bytes) {
  if (bytes == null)
    return null;
  return bytes.length == 0 ? "" : CodecUtils.toStringDirect(codec.encode(bytes));
}
origin: aws/aws-sdk-java

/**
 * Returns the MD5 in base64 for the given byte array.
 */
public static String md5AsBase64(byte[] input) {
  return Base64.encodeAsString(computeMD5Hash(input));
}
com.amazonaws.util

Most used classes

  • AWSRequestMetrics
    Used as both a base class and a minimal support of AWS SDK request metrics. The base class of suppor
  • CredentialUtils
  • StringUtils
    Utilities for converting objects to strings.
  • IOUtils
    Utilities for IO operations.
  • Base64
    A Base 64 codec API. See http://www.ietf.org/rfc/rfc4648.txt
  • BinaryUtils,
  • JsonUtils,
  • AwsJsonReader,
  • AwsJsonWriter,
  • DateUtils,
  • EC2MetadataUtils,
  • ValidationUtils,
  • Md5Utils,
  • AwsHostNameUtils,
  • CollectionUtils,
  • TimingInfo,
  • VersionInfoUtils,
  • XpathUtils,
  • ImmutableMapParameter
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now