com.aelitis.azureus.util
Class ImportExportUtils

java.lang.Object
  extended by com.aelitis.azureus.util.ImportExportUtils

public final class ImportExportUtils
extends Object

Note: There's a similarly defined map processing utility class called MapUtils. Since there are differences in implementation, both have been kept until someone goes through each callee and check if it can be switched to use just one of them.


Constructor Summary
ImportExportUtils()
           
 
Method Summary
static void exportBoolean(Map map, String key, boolean value)
           
static void exportFloat(Map map, String key, float value)
           
static void exportInt(Map map, String key, int value)
           
static void exportIntArray(Map map, String key, int[] values)
           
static void exportJSONBoolean(Map map, String key, boolean value)
           
static void exportJSONString(Map map, String key, String value)
           
static void exportJSONStringArray(Map map, String key, String[] data)
           
static void exportJSONURL(Map map, String key, String value)
           
static void exportLong(Map map, String key, long value)
           
static void exportString(Map map, String key, String value)
           
static void exportStringArray(Map map, String key, String[] data)
           
static void exportURL(Map map, String key, String value)
           
static boolean importBoolean(Map map, String key)
           
static boolean importBoolean(Map map, String key, boolean def)
           
static float importFloat(Map map, String key, float def)
           
static int importInt(Map map, String key)
           
static int importInt(Map map, String key, int def)
           
static int[] importIntArray(Map map, String key)
           
static long importLong(Map map, String key)
           
static long importLong(Map map, String key, long def)
           
static String importString(Map map, String key)
           
static String importString(Map map, String key, String def)
           
static String[] importStringArray(Map map, String key)
           
static String importURL(Map map, String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportExportUtils

public ImportExportUtils()
Method Detail

exportString

public static final void exportString(Map map,
                                      String key,
                                      String value)

exportJSONString

public static final void exportJSONString(Map map,
                                          String key,
                                          String value)

importString

public static final String importString(Map map,
                                        String key,
                                        String def)

importString

public static final String importString(Map map,
                                        String key)

importLong

public static final long importLong(Map map,
                                    String key)

importLong

public static final long importLong(Map map,
                                    String key,
                                    long def)

exportLong

public static final void exportLong(Map map,
                                    String key,
                                    long value)

exportInt

public static final void exportInt(Map map,
                                   String key,
                                   int value)

importInt

public static final int importInt(Map map,
                                  String key)

importInt

public static final int importInt(Map map,
                                  String key,
                                  int def)

exportFloat

public static final void exportFloat(Map map,
                                     String key,
                                     float value)

importFloat

public static final float importFloat(Map map,
                                      String key,
                                      float def)

exportBoolean

public static final void exportBoolean(Map map,
                                       String key,
                                       boolean value)

importBoolean

public static final boolean importBoolean(Map map,
                                          String key)

importBoolean

public static final boolean importBoolean(Map map,
                                          String key,
                                          boolean def)

exportJSONBoolean

public static final void exportJSONBoolean(Map map,
                                           String key,
                                           boolean value)

importURL

public static final String importURL(Map map,
                                     String key)

exportURL

public static final void exportURL(Map map,
                                   String key,
                                   String value)

exportJSONURL

public static final void exportJSONURL(Map map,
                                       String key,
                                       String value)

importStringArray

public static final String[] importStringArray(Map map,
                                               String key)

exportStringArray

public static final void exportStringArray(Map map,
                                           String key,
                                           String[] data)

exportJSONStringArray

public static final void exportJSONStringArray(Map map,
                                               String key,
                                               String[] data)

exportIntArray

public static final void exportIntArray(Map map,
                                        String key,
                                        int[] values)

importIntArray

public static final int[] importIntArray(Map map,
                                         String key)