public final class MPDUtility extends Object
| Constructor and Description |
|---|
MPDUtility() |
| Modifier and Type | Method and Description |
|---|---|
static void |
dumpRow(Map<String,Object> row)
Dump the contents of a row from an MPD file.
|
static void |
fileDump(String fileName,
byte[] data)
Writes a large byte array to a file.
|
static void |
fileHexDump(String fileName,
byte[] data)
Writes a hex dump to a file for a large byte array.
|
static void |
fileHexDump(String fileName,
InputStream is)
Writes a hex dump to a file from a POI input stream.
|
static Duration |
getAdjustedDuration(ProjectFile file,
int duration,
TimeUnit timeUnit)
Given a duration and the time units for the duration extracted from an MPP
file, this method creates a new Duration to represent the given
duration.
|
static Duration |
getDuration(double value,
TimeUnit type)
Reads a duration value.
|
static TimeUnit |
getDurationTimeUnits(int type)
This method converts between the duration units representation
used in the MPP file, and the standard MPX duration units.
|
static CurrencySymbolPosition |
getSymbolPosition(int value)
This method maps the currency symbol position from the
representation used in the MPP file to the representation
used by MPX.
|
static String |
hexdump(byte[] buffer,
boolean ascii)
This method generates a formatted version of the data contained
in a byte array.
|
static String |
hexdump(byte[] buffer,
boolean ascii,
int columns,
String prefix)
This method generates a formatted version of the data contained
in a byte array.
|
static String |
hexdump(byte[] buffer,
int offset,
int length,
boolean ascii)
This method generates a formatted version of the data contained
in a byte array.
|
public static CurrencySymbolPosition getSymbolPosition(int value)
value - MPP symbol positionpublic static final TimeUnit getDurationTimeUnits(int type)
type - MPP unitspublic static Duration getAdjustedDuration(ProjectFile file, int duration, TimeUnit timeUnit)
file - parent fileduration - duration lengthtimeUnit - duration unitspublic static final Duration getDuration(double value, TimeUnit type)
value - Duration valuetype - type of units of the durationpublic static void dumpRow(Map<String,Object> row)
row - row datapublic static final String hexdump(byte[] buffer, int offset, int length, boolean ascii)
buffer - data to be displayedoffset - offset of start of data to be displayedlength - length of data to be displayedascii - flag indicating whether ASCII equivalent chars should also be displayedpublic static final String hexdump(byte[] buffer, boolean ascii)
buffer - data to be displayedascii - flag indicating whether ASCII equivalent chars should also be displayedpublic static final String hexdump(byte[] buffer, boolean ascii, int columns, String prefix)
buffer - data to be displayedascii - flag indicating whether ASCII equivalent chars should also be displayedcolumns - number of columnsprefix - prefix to be added before the start of the datapublic static final void fileHexDump(String fileName, byte[] data)
fileName - output file namedata - target datapublic static final void fileHexDump(String fileName, InputStream is)
fileName - output file nameis - input streampublic static final void fileDump(String fileName, byte[] data)
fileName - output file namedata - target dataCopyright © 2013. All Rights Reserved.