org.n52.security.common.util
Class StringUtils

java.lang.Object
  extended by org.n52.security.common.util.StringUtils

public final class StringUtils
extends Object

This class provides some utilities to work with strings in the 52n security services suite.


Method Summary
static String decodeBase64(String pEncodedString)
          Decodes a Base64 encoded String.
static String encodeBase64(String pString)
          Encoded a String into another Base64 encoded String.
static String getCharsetFromContentType(String contentType)
           
static String getStreamAsString(InputStream is, String charset)
          Deprecated. use streamToString(InputStream, String)
static String streamToString(InputStream is, String charset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decodeBase64

public static String decodeBase64(String pEncodedString)
Decodes a Base64 encoded String. Interprets bytes as UTF-8 encoded by default.

Parameters:
pEncodedString -
Returns:

encodeBase64

public static String encodeBase64(String pString)
Encoded a String into another Base64 encoded String. Interprets String as UTF-8 encoded by default.

Parameters:
pString -
Returns:

getStreamAsString

@Deprecated
public static String getStreamAsString(InputStream is,
                                                  String charset)
                                throws IOException
Deprecated. use streamToString(InputStream, String)

Throws:
IOException

streamToString

public static String streamToString(InputStream is,
                                    String charset)

getCharsetFromContentType

public static String getCharsetFromContentType(String contentType)


Copyright © 2004–2013 52north.org. All rights reserved.