org.jenkinsci.plugins.uithemes.util
Class JSONReadWrite

java.lang.Object
  extended by org.jenkinsci.plugins.uithemes.util.JSONReadWrite

public class JSONReadWrite
extends Object

Author:
tom.fennelly@gmail.com

Field Summary
static com.fasterxml.jackson.databind.ObjectMapper jsonMapper
           
 
Constructor Summary
JSONReadWrite()
           
 
Method Summary
static
<T> T
fromBytes(byte[] bytes, Charset encoding, Class<T> to)
           
static
<T> T
fromRequest(org.kohsuke.stapler.StaplerRequest req, Class<T> to)
           
static
<T> T
fromString(String string, Class<T> to)
           
static
<T> T
fromUTF8File(File file, Class<T> to)
           
static String toString(Object object)
           
static byte[] toUTF8Bytes(Object object)
           
static void toUTF8File(Object object, File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jsonMapper

public static final com.fasterxml.jackson.databind.ObjectMapper jsonMapper
Constructor Detail

JSONReadWrite

public JSONReadWrite()
Method Detail

fromString

public static <T> T fromString(String string,
                               Class<T> to)
                    throws IOException
Throws:
IOException

fromBytes

public static <T> T fromBytes(byte[] bytes,
                              Charset encoding,
                              Class<T> to)
                   throws IOException
Throws:
IOException

fromUTF8File

public static <T> T fromUTF8File(File file,
                                 Class<T> to)
                      throws IOException
Throws:
IOException

fromRequest

public static <T> T fromRequest(org.kohsuke.stapler.StaplerRequest req,
                                Class<T> to)
                     throws IOException
Throws:
IOException

toString

public static String toString(Object object)
                       throws IOException
Throws:
IOException

toUTF8Bytes

public static byte[] toUTF8Bytes(Object object)
                          throws IOException
Throws:
IOException

toUTF8File

public static void toUTF8File(Object object,
                              File file)
                       throws IOException
Throws:
IOException


Copyright © 2004-2015. All Rights Reserved.