nl.hippo.client.webdav.utils
Class Converters

java.lang.Object
  extended by nl.hippo.client.webdav.utils.Converters

public class Converters
extends Object

Utility class: contains various static converter methods


Method Summary
static Document bytes2Dom(byte[] bytes)
           
static String bytes2PrettyPrintedString(byte[] bytes, String encoding)
           
static void bytes2SaxContentHandler(byte[] bytes, DefaultHandler handler)
           
static InputStream bytes2Stream(byte[] bytes)
           
static String bytes2String(byte[] bytes, String encoding)
           
static byte[] stream2Bytes(InputStream stream)
           
static String stream2String(InputStream stream, String encoding)
           
static InputStream string2Stream(String string)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

stream2Bytes

public static byte[] stream2Bytes(InputStream stream)
                           throws IOException
Throws:
IOException

stream2String

public static String stream2String(InputStream stream,
                                   String encoding)
                            throws IOException
Throws:
IOException

string2Stream

public static InputStream string2Stream(String string)

bytes2Stream

public static InputStream bytes2Stream(byte[] bytes)

bytes2String

public static String bytes2String(byte[] bytes,
                                  String encoding)
                           throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

bytes2Dom

public static Document bytes2Dom(byte[] bytes)
                          throws ClientException
Throws:
ClientException

bytes2SaxContentHandler

public static void bytes2SaxContentHandler(byte[] bytes,
                                           DefaultHandler handler)
                                    throws ClientException
Throws:
ClientException

bytes2PrettyPrintedString

public static String bytes2PrettyPrintedString(byte[] bytes,
                                               String encoding)
                                        throws ClientException,
                                               IOException
Throws:
ClientException
IOException


Copyright © 2006-2009 Hippo. All Rights Reserved.