public class IrpUtils extends Object
Modifier and Type | Field and Description |
---|---|
static long |
all |
static String |
decodeIrUrl |
static String |
defaultConfigfile |
static double |
defaultFrequency
Use if no information at all available.
|
static Charset |
dumbCharset |
static String |
dumbCharsetName |
static Locale |
dumbLocale |
static int |
exitConfigReadError |
static int |
exitConfigWriteError |
static int |
exitDynamicLinkError |
static int |
exitFatalProgramFailure |
static int |
exitInternalFailure |
static int |
exitIoError |
static int |
exitRestart |
static int |
exitSemanticUsageError |
static int |
exitSuccess |
static int |
exitThisCannotHappen |
static int |
exitUsageError |
static int |
exitXmlError |
static long |
invalid |
static String |
irpNotationUrl |
static String |
jp1WikiUrl |
static double |
microseconds2seconds |
static double |
seconds2microseconds |
static long |
some |
Constructor and Description |
---|
IrpUtils() |
Modifier and Type | Method and Description |
---|---|
static InputStream |
getInputSteam(String filename)
Either opens an input file or returns stdin.
|
static PrintStream |
getPrintSteam(String filename)
Either opens a file (optionally for appending (if beginning with +)) or returns stdout.
|
static boolean |
isInstance(Object o,
String classname) |
static String |
join(int beg,
String[] s,
String separator)
Joins the Strings in the second argument, starting at the first argument, separating them with the third argument.
|
static String |
join(String[] s,
char separator) |
static String |
join(String[] s,
String separator) |
static double |
l1Norm(double[] sequence) |
static double |
l1Norm(Double[] sequence) |
static double |
l1Norm(double[] sequence,
int beg,
int length) |
static void |
main(String[] args) |
static long |
parseLong(String str,
boolean special)
Parses integers of base 2 (prefix "0b" or "%", 8 (leading 0), 10, or 16 (prefix "0x).
|
static long |
parseUpper(String str) |
static long |
power(long x,
long y)
The power function for long arguments.
|
static long |
reverse(long x,
int width)
Reverses the bits, living in a width-bit wide world.
|
static String |
spaces(int length) |
static String |
stringArray(int[] array) |
static long |
variableGet(Map<String,Long> map,
String name) |
static String |
variableHeader(HashMap<String,Long> params)
Produces a header in the spirit of Makehex.
|
public static final String defaultConfigfile
public static final String dumbCharsetName
public static final Charset dumbCharset
public static final Locale dumbLocale
public static final long invalid
public static final long all
public static final long some
public static final int exitSuccess
public static final int exitUsageError
public static final int exitSemanticUsageError
public static final int exitFatalProgramFailure
public static final int exitInternalFailure
public static final int exitConfigReadError
public static final int exitConfigWriteError
public static final int exitIoError
public static final int exitXmlError
public static final int exitDynamicLinkError
public static final int exitThisCannotHappen
public static final int exitRestart
public static final String jp1WikiUrl
public static final String irpNotationUrl
public static final String decodeIrUrl
public static final double defaultFrequency
public static final double microseconds2seconds
public static final double seconds2microseconds
public static String join(int beg, String[] s, String separator)
beg
- Index of first argument to consider,s
- Array of strings to be joinedseparator
- public static String stringArray(int[] array)
public static double l1Norm(Double[] sequence)
public static double l1Norm(double[] sequence)
public static double l1Norm(double[] sequence, int beg, int length)
public static String spaces(int length)
public static PrintStream getPrintSteam(String filename) throws FileNotFoundException
filename
- Either - for stdout, or a file name, or null. If starting with +, the file is opened in append mode, after removing the +-character.FileNotFoundException
- if FileOutputStream doespublic static InputStream getInputSteam(String filename) throws FileNotFoundException
filename
- FileNotFoundException
public static long power(long x, long y)
x
- longy
- long, non-negativeArithmeticException
public static long reverse(long x, int width)
x
- width
- public static long parseLong(String str, boolean special)
str
- String to be parsedspecial
- If the special stuff should be interpreted ('*', '+', intervals).public static long parseUpper(String str)
public static String variableHeader(HashMap<String,Long> params)
params
- HashMappublic static void main(String[] args)
Copyright © 2015. All rights reserved.