|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mpxj.mpd.MPDUtility
public final class MPDUtility
This class implements common utility methods used when processing MPD files.
| Constructor Summary | |
|---|---|
MPDUtility()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MPDUtility()
| Method Detail |
|---|
public static CurrencySymbolPosition getSymbolPosition(int value)
value - MPP symbol position
public static final TimeUnit getDurationTimeUnits(int type)
type - MPP units
public static Duration getAdjustedDuration(ProjectFile file,
int duration,
TimeUnit timeUnit)
file - parent fileduration - duration lengthtimeUnit - duration units
public static final Duration getDuration(double value,
TimeUnit type)
value - Duration valuetype - type of units of the duration
public static void dumpRow(Map<String,Object> row)
row - row data
public 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 displayed
public static final String hexdump(byte[] buffer,
boolean ascii)
buffer - data to be displayedascii - flag indicating whether ASCII equivalent chars should also be displayed
public 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 data
public static final void fileHexDump(String fileName,
byte[] data)
fileName - output file namedata - target data
public static final void fileHexDump(String fileName,
InputStream is)
fileName - output file nameis - input stream
public static final void fileDump(String fileName,
byte[] data)
fileName - output file namedata - target data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||