|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectau.com.zip.cs.HierUtil
public class HierUtil
A bunch of operations for use by implementations of Hier.
| Method Summary | |
|---|---|
static MapHier |
edit(MapHier h)
Run the external editor on this MapHier
and return a new MapHier parsed from the edited text. |
static ParseException |
mkPE(String err,
Reader tail)
Return a new ParseException. |
static ParseException |
mkPE(String err,
String tail)
Return a new ParseException. |
static MapHier |
newPathHier(File path)
Return a new MapHier attached to the specified file or directory. |
static MapHier |
newPathHier(String path)
Return a new MapHier attached to the specified file or directory. |
static Hier |
readEntity(PushbackReader r)
Read a Hier entity from the supplied PushbackReader. |
static MapHier |
saveHier(File path,
MapHier hier,
boolean merge)
Save a MapHier to a path, possibly merging with the existing content,
and return a new MapHier attached to the supplied path. |
static Hier |
toHier(Object o)
Convert an arbitrary Object to a Hier. |
static ListHier |
toListHier(List l)
Produce a ListHier from a List. |
static MapHier |
toMapHier(Map m)
Produce a MapHier from a Map. |
static String |
transcribe(Hier h,
int indent)
Return a single line String transcription of this object. |
static int |
transcribe(Writer w,
Hier h,
int indent)
Transcribe a Hier. |
static int |
writeMap(Writer w,
MapHier h,
int indent)
Transcribe a MapHier. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final MapHier edit(MapHier h)
throws IOException,
ParseException
MapHier
and return a new MapHier parsed from the edited text.
h - the MapHier to edit
IOException
ParseExceptionEditor
public static final MapHier newPathHier(File path)
throws IOException,
ParseException
MapHier attached to the specified file or directory.
path - the file or directory reference
IOException
ParseException
public static final MapHier newPathHier(String path)
throws IOException,
ParseException
MapHier attached to the specified file or directory.
path - the file or directory reference
IOException
ParseException
public static final MapHier saveHier(File path,
MapHier hier,
boolean merge)
throws IOException
MapHier to a path, possibly merging with the existing content,
and return a new MapHier attached to the supplied path.
path - the pathhier - the MapHier to savemerge - whther to merge or replace the existing content
IOException
public static final Hier readEntity(PushbackReader r)
throws IOException,
ParseException
Hier entity from the supplied PushbackReader.
r - the Reader
IOException
ParseException
public static final String transcribe(Hier h,
int indent)
String transcription of this object.
h - the Hier to transcribeindent - the prevailing indent preceeding this output, or -1 for single line output
public static int transcribe(Writer w,
Hier h,
int indent)
throws IOException
Hier.
w - the Writer to which to transcribe the datah - the Hierindent - the prevailing indent preceeding this output, or -1 for single line output
IOException
public static final int writeMap(Writer w,
MapHier h,
int indent)
throws IOException
MapHier.
w - the Writer to which to transcribe the datah - the MapHierindent - the prevailing indent preceeding this output, or -1 for single line output
IOExceptionpublic static final Hier toHier(Object o)
Object to a Hier.
o - the object
public static final MapHier toMapHier(Map m)
MapHier from a Map.
m - the map
public static final ListHier toListHier(List l)
ListHier from a List.
l - the list
public static ParseException mkPE(String err,
String tail)
ParseException.
err - the complainttail - the remaining text where the error was encountered
public static ParseException mkPE(String err,
Reader tail)
throws IOException
ParseException.
err - the complainttail - a Reader positioned at the remaining text where the error was encountered
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||