|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.jqhome.jwps.JWPLoader
|
+--net.jqhome.jwps.ea.FileEAs
This class represents the extended attributes (EAs) on a file running under OS/2 2.0
or above.
An
EAs normally require a lot of really nasty programming in C, since they are kept in a format that
warms any assembly language programmer's heart.There are many places to go wrong in using EAs
natively. All of this has been removed and it is hoped that you will find them easy enough to use
that they will become a standard part of your programming vocabulary.
The default for setting EAs is to not set those that have been flagged as bad. This helps prevent changing the EAs of some other application, which does not know how to write them properly. Again, good citizenship means leave other folks EAs alone if possible.
| Field Summary | |
static int |
MAX_EA_SIZE
The maximum size of an EA, 64kbytes. |
| Constructor Summary | |
FileEAs(java.io.File file)
Constructor for this class. |
|
FileEAs(java.lang.String fileName)
Constructor for this class. |
|
| Method Summary | |
protected EAHashtable |
_getAllEAs(java.lang.String fileName)
|
protected int |
_getEASize(java.lang.String fileName)
|
protected net.jqhome.tools.StringVector |
_listEANames(java.lang.String fileName)
|
protected void |
_removeEA(java.lang.String fileName,
java.lang.String eaName)
|
protected void |
_setEA(java.lang.String fileName,
RawEA rawEA)
|
EAHashtable |
getAllEAs()
|
AbstractEA |
getEA(AbstractEA aEA)
Convenience for getting an EA. |
AbstractEA |
getEA(java.lang.String eaName)
|
int |
getEASize()
Returns the amount of space taken up on disk by the EAs. |
java.lang.String |
getFileName()
Retrieves the file name for this class. |
net.jqhome.tools.StringVector |
listEANames()
Lists all of the EA names associated with this file. |
void |
removeAllEAs()
|
void |
removeEA(AbstractEA aEA)
Removes a single EA, given the EA. |
void |
removeEA(java.lang.String eaName)
Removes a single EA, given its name. |
void |
removeEAs(AbstractEA[] aEAs)
Removes a list of EAs, passed as an array of AbstractEA objects. |
void |
removeEAs(EAHashtable eaHT)
Removes all the EAs that occur in the given EA hashtable from the file. |
void |
removeEAs(java.util.Vector v)
Removes a list of EAs, passed as a java.util.Vector objects. |
void |
setEA(AbstractEA ea)
|
void |
setEAs(AbstractEA[] aEAs)
This will not set bad EAs. |
void |
setEAs(AbstractEA[] aEAs,
boolean setBadEAs)
Sets a list of EAs, given as an array of AbstractEA objects. |
void |
setEAs(EAHashtable eaHT)
Default is to not set bad EAs |
void |
setEAs(EAHashtable eaHT,
boolean setBadEAs)
Sets the EAs from the hashtable. |
void |
setEAs(java.util.Vector v)
Default is to not set bad EAs |
void |
setEAs(java.util.Vector v,
boolean setBadEAs)
Sets a list of EAs, given as a java.util.Vector. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int MAX_EA_SIZE
| Constructor Detail |
public FileEAs(java.lang.String fileName)
throws JWPException
public FileEAs(java.io.File file)
throws JWPException
| Method Detail |
public java.lang.String getFileName()
public void setEA(AbstractEA ea)
throws JWPException
JWPException
protected void _setEA(java.lang.String fileName,
RawEA rawEA)
throws JWPException
JWPException
protected net.jqhome.tools.StringVector _listEANames(java.lang.String fileName)
throws JWPException
JWPException
public net.jqhome.tools.StringVector listEANames()
throws JWPException
JWPException
public AbstractEA getEA(java.lang.String eaName)
throws JWPException
JWPException
public AbstractEA getEA(AbstractEA aEA)
throws JWPException
JWPException
public EAHashtable getAllEAs()
throws JWPException
JWPException
protected EAHashtable _getAllEAs(java.lang.String fileName)
throws JWPException
JWPException
public void setEAs(java.util.Vector v)
throws JWPException
JWPException
public void setEAs(java.util.Vector v,
boolean setBadEAs)
throws JWPException
java.util.Vector. See note on speed in the array version of this
call.
JWPException
public void setEAs(EAHashtable eaHT)
throws JWPException
JWPException
public void setEAs(EAHashtable eaHT,
boolean setBadEAs)
throws JWPException
JWPException
public void setEAs(AbstractEA[] aEAs)
throws JWPException
JWPException
public void setEAs(AbstractEA[] aEAs,
boolean setBadEAs)
throws JWPException
AbstractEA objects. If you have several EAs
to write to disk, it is best to use this call since otherwise each setEA call causes the entire
set of EAs to be checked for size. This is done once in this call, making it run much (as in 10x) faster.
This will only overrite EAs flagged as bad if you tell it to. The assumption is that if an EA is corrupt, this is because some other application wrote something very specific and fiddling with these is bad form.
JWPException
public void removeEAs(AbstractEA[] aEAs)
throws JWPException
AbstractEA objects. Note: it has been found for very large numbers of these
(in the hundreds) that this can simply fail. If you need that many EAs, it is probably a good idea to put them into a single multi-valued
EA.
JWPException
public void removeEAs(java.util.Vector v)
throws JWPException
java.util.Vector objects. See note in array-valued method.
JWPException
public void removeEAs(EAHashtable eaHT)
throws JWPException
JWPException
public void removeAllEAs()
throws JWPException
JWPException
public void removeEA(AbstractEA aEA)
throws JWPException
JWPException
protected void _removeEA(java.lang.String fileName,
java.lang.String eaName)
throws JWPException
JWPException
public void removeEA(java.lang.String eaName)
throws JWPException
JWPException
protected int _getEASize(java.lang.String fileName)
throws JWPException
JWPException
public int getEASize()
throws JWPException
JWPException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||