com.amazonaws.util
Class StringUtils

java.lang.Object
  extended by com.amazonaws.util.StringUtils

public class StringUtils
extends java.lang.Object

Utilities for converting objects to strings.


Field Summary
static java.nio.charset.Charset UTF8
           
 
Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String fromBigDecimal(java.math.BigDecimal value)
           
static java.lang.String fromBigInteger(java.math.BigInteger value)
           
static java.lang.String fromBoolean(java.lang.Boolean value)
           
static java.lang.String fromByte(java.lang.Byte b)
          Returns the string representation of the specified Byte.
static java.lang.String fromByteBuffer(java.nio.ByteBuffer byteBuffer)
          Base64 encodes the data in the specified byte buffer and returns it as a base64 encoded string.
static java.lang.String fromDate(java.util.Date value)
          Converts the specified date to an ISO 8601 timestamp string and returns it.
static java.lang.String fromDouble(java.lang.Double d)
          Returns the string representation of the specified double.
static java.lang.String fromFloat(java.lang.Float value)
           
static java.lang.String fromInteger(java.lang.Integer value)
           
static java.lang.String fromLong(java.lang.Long value)
           
static java.lang.String fromString(java.lang.String value)
           
static java.lang.String join(java.lang.String joiner, java.lang.String... parts)
          Joins the strings in parts with joiner between each string
static java.lang.String replace(java.lang.String originalString, java.lang.String partToMatch, java.lang.String replacement)
           
static java.math.BigDecimal toBigDecimal(java.lang.String s)
           
static java.math.BigInteger toBigInteger(java.lang.String s)
           
static java.lang.Boolean toBoolean(java.lang.StringBuilder value)
           
static java.lang.Integer toInteger(java.lang.StringBuilder value)
           
static java.lang.String toString(java.lang.StringBuilder value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UTF8

public static final java.nio.charset.Charset UTF8
Constructor Detail

StringUtils

public StringUtils()
Method Detail

toInteger

public static java.lang.Integer toInteger(java.lang.StringBuilder value)

toString

public static java.lang.String toString(java.lang.StringBuilder value)

toBoolean

public static java.lang.Boolean toBoolean(java.lang.StringBuilder value)

fromInteger

public static java.lang.String fromInteger(java.lang.Integer value)

fromLong

public static java.lang.String fromLong(java.lang.Long value)

fromString

public static java.lang.String fromString(java.lang.String value)

fromBoolean

public static java.lang.String fromBoolean(java.lang.Boolean value)

fromBigInteger

public static java.lang.String fromBigInteger(java.math.BigInteger value)

fromBigDecimal

public static java.lang.String fromBigDecimal(java.math.BigDecimal value)

toBigInteger

public static java.math.BigInteger toBigInteger(java.lang.String s)

toBigDecimal

public static java.math.BigDecimal toBigDecimal(java.lang.String s)

fromFloat

public static java.lang.String fromFloat(java.lang.Float value)

fromDate

public static java.lang.String fromDate(java.util.Date value)
Converts the specified date to an ISO 8601 timestamp string and returns it.

Parameters:
value - The date to format as an ISO 8601 timestamp string.
Returns:
An ISO 8601 timestamp string created from the specified date.

fromDouble

public static java.lang.String fromDouble(java.lang.Double d)
Returns the string representation of the specified double.

Parameters:
d - The double to represent as a string.
Returns:
The string representation of the specified double.

fromByte

public static java.lang.String fromByte(java.lang.Byte b)
Returns the string representation of the specified Byte.

Parameters:
b - The Byte to represent as a string.
Returns:
The string representation of the specified Byte.

fromByteBuffer

public static java.lang.String fromByteBuffer(java.nio.ByteBuffer byteBuffer)
Base64 encodes the data in the specified byte buffer and returns it as a base64 encoded string.

Parameters:
byteBuffer - The data to base64 encode and return as a string.
Returns:
The base64 encoded contents of the specified byte buffer.

replace

public static java.lang.String replace(java.lang.String originalString,
                                       java.lang.String partToMatch,
                                       java.lang.String replacement)

join

public static java.lang.String join(java.lang.String joiner,
                                    java.lang.String... parts)
Joins the strings in parts with joiner between each string

Parameters:
joiner - the string to insert between the strings in parts
parts - the parts to join


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.