public class GeoJSONUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DATE_FORMAT
Date format (ISO 8601)
|
static FastDateFormat |
dateFormatter |
static TimeZone |
TIME_ZONE |
Constructor and Description |
---|
GeoJSONUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addOrdinate(List ordinates,
Object value) |
static StringBuilder |
array(String key,
Object value,
StringBuilder sb) |
static Coordinate |
createCoordinate(List ordinates) |
static Coordinate[] |
createCoordinates(List coordinates) |
static void |
encode(Map<String,Object> obj,
Object output) |
static void |
encode(String json,
Object output) |
static StringBuilder |
entry(String key,
Object value,
StringBuilder sb) |
static StringBuilder |
nul(StringBuilder sb) |
static <T> T |
parse(IContentHandler<T> handler,
Object input,
boolean trace) |
static StringBuilder |
string(String string,
StringBuilder sb) |
static Reader |
toReader(Object input)
Converts an object to a
Reader instance. |
static Writer |
toWriter(Object output)
Converts an object to
Writer instance. |
static <T> T |
trace(T handler,
Class<T> clazz) |
public static final String DATE_FORMAT
public static final TimeZone TIME_ZONE
public static final FastDateFormat dateFormatter
public static Reader toReader(Object input) throws IOException
Reader
instance.
The input parameter may be one of the following types:
* A string parameter is considered a file path.input
- The input object.IOException
public static Writer toWriter(Object output) throws IOException
Writer
instance.
The output parameter may be one of the following types:
* A string parameter is considered a file path.output
- The output object.IOException
public static StringBuilder string(String string, StringBuilder sb)
public static StringBuilder entry(String key, Object value, StringBuilder sb)
public static StringBuilder array(String key, Object value, StringBuilder sb)
public static StringBuilder nul(StringBuilder sb)
public static <T> T trace(T handler, Class<T> clazz)
public static Coordinate createCoordinate(List ordinates) throws ParseException
ParseException
public static Coordinate[] createCoordinates(List coordinates)
public static <T> T parse(IContentHandler<T> handler, Object input, boolean trace) throws IOException
IOException
public static void encode(String json, Object output) throws IOException
IOException
public static void encode(Map<String,Object> obj, Object output) throws IOException
IOException
Copyright © 1996–2019 Geotools. All rights reserved.