org.nuxeo.theme.presets
Class PaletteParser
java.lang.Object
org.nuxeo.theme.presets.PaletteParser
- Direct Known Subclasses:
- GimpPaletteParser, PhotoshopPaletteParser, PropertiesPaletteParser
public class PaletteParser
- extends Object
Method Summary |
static boolean |
checkSanity(byte[] bytes)
|
static PaletteFamily |
identifyPaletteType(byte[] bytes,
String filename)
|
static Map<String,String> |
parse(byte[] bytes,
String filename)
|
static Map<String,String> |
parse(InputStream in,
String filename)
|
static Map<String,String> |
parse(URL url)
|
static Map<String,String> |
parseCsv(String text)
|
static String |
renderPaletteAsCsv(byte[] bytes,
String fileName)
|
static String |
rgbToHex(int r,
int g,
int b)
|
PaletteParser
public PaletteParser()
parse
public static Map<String,String> parse(URL url)
checkSanity
public static boolean checkSanity(byte[] bytes)
rgbToHex
public static String rgbToHex(int r,
int g,
int b)
identifyPaletteType
public static PaletteFamily identifyPaletteType(byte[] bytes,
String filename)
throws PaletteIdentifyException
- Throws:
PaletteIdentifyException
parse
public static Map<String,String> parse(InputStream in,
String filename)
throws IOException,
PaletteIdentifyException,
PaletteParseException
- Throws:
IOException
PaletteIdentifyException
PaletteParseException
parse
public static Map<String,String> parse(byte[] bytes,
String filename)
throws PaletteIdentifyException,
PaletteParseException
- Throws:
PaletteIdentifyException
PaletteParseException
renderPaletteAsCsv
public static String renderPaletteAsCsv(byte[] bytes,
String fileName)
parseCsv
public static Map<String,String> parseCsv(String text)
Copyright © 2011 Nuxeo SAS. All Rights Reserved.