com.amazonaws.util
Class StringUtils

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

public class StringUtils
extends Object

Utilities for converting objects to strings.


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

Field Detail

UTF8

public static final Charset UTF8
Constructor Detail

StringUtils

public StringUtils()
Method Detail

toInteger

public static Integer toInteger(StringBuilder value)

toString

public static String toString(StringBuilder value)

toBoolean

public static Boolean toBoolean(StringBuilder value)

fromInteger

public static String fromInteger(Integer value)

fromLong

public static String fromLong(Long value)

fromString

public static String fromString(String value)

fromBoolean

public static String fromBoolean(Boolean value)

fromBigInteger

public static String fromBigInteger(BigInteger value)

fromBigDecimal

public static String fromBigDecimal(BigDecimal value)

toBigInteger

public static BigInteger toBigInteger(String s)

toBigDecimal

public static BigDecimal toBigDecimal(String s)

fromFloat

public static String fromFloat(Float value)

fromDate

public static String fromDate(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 String fromDouble(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 String fromByte(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 String fromByteBuffer(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 String replace(String originalString,
                             String partToMatch,
                             String replacement)

join

public static String join(String joiner,
                          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 © 2016. All rights reserved.