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)
                               throws IOException
Throws:
IOException

exportJSONString

public static final void exportJSONString(Map map,
                                          String key,
                                          String value)
                                   throws IOException
Throws:
IOException

importString

public static final String importString(Map map,
                                        String key,
                                        String def)
                                 throws IOException
Throws:
IOException

importString

public static final String importString(Map map,
                                        String key)
                                 throws IOException
Throws:
IOException

importLong

public static final long importLong(Map map,
                                    String key)
                             throws IOException
Throws:
IOException

importLong

public static final long importLong(Map map,
                                    String key,
                                    long def)
                             throws IOException
Throws:
IOException

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)
                           throws IOException
Throws:
IOException

importInt

public static final int importInt(Map map,
                                  String key,
                                  int def)
                           throws IOException
Throws:
IOException

exportFloat

public static final void exportFloat(Map map,
                                     String key,
                                     float value)
                              throws IOException
Throws:
IOException

importFloat

public static final float importFloat(Map map,
                                      String key,
                                      float def)
                               throws IOException
Throws:
IOException

exportBoolean

public static final void exportBoolean(Map map,
                                       String key,
                                       boolean value)
                                throws IOException
Throws:
IOException

importBoolean

public static final boolean importBoolean(Map map,
                                          String key)
                                   throws IOException
Throws:
IOException

importBoolean

public static final boolean importBoolean(Map map,
                                          String key,
                                          boolean def)
                                   throws IOException
Throws:
IOException

exportJSONBoolean

public static final void exportJSONBoolean(Map map,
                                           String key,
                                           boolean value)
                                    throws IOException
Throws:
IOException

importURL

public static final String importURL(Map map,
                                     String key)
                              throws IOException
Throws:
IOException

exportURL

public static final void exportURL(Map map,
                                   String key,
                                   String value)
                            throws IOException
Throws:
IOException

exportJSONURL

public static final void exportJSONURL(Map map,
                                       String key,
                                       String value)
                                throws IOException
Throws:
IOException

importStringArray

public static final String[] importStringArray(Map map,
                                               String key)
                                        throws IOException
Throws:
IOException

exportStringArray

public static final void exportStringArray(Map map,
                                           String key,
                                           String[] data)
                                    throws IOException
Throws:
IOException

exportJSONStringArray

public static final void exportJSONStringArray(Map map,
                                               String key,
                                               String[] data)
                                        throws IOException
Throws:
IOException

exportIntArray

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

importIntArray

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