|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kom.gateway.DBLow | +--kom.gateway.DBHigh | +--kom.gateway.KOMutil
Common utility functions and data for the KOM system
Inner Class Summary | |
(package private) class |
KOMutil.LookupTables
Auxiliary class for tables and methods to up login ids, etc |
(package private) class |
KOMutil.UFtable
Contains a table of users or forums, and a method to find an entry in the table |
Field Summary | |
(package private) static java.lang.String |
ACT
|
(package private) boolean |
anyAccess
When set, allows any access to objects. |
(package private) java.lang.String |
arglist
List of arguments from request URL |
(package private) java.lang.String |
argsep
Argument separator in URLs |
(package private) java.util.Hashtable |
argtab
Parsed list of arguments from request URL |
(package private) Upload[] |
attachments
Attachments |
(package private) static java.lang.String |
BOK
|
(package private) static java.lang.String |
BOUNDARYSTART
|
(package private) static java.lang.String |
CAT
Object types |
(package private) static java.lang.String |
CHA
|
(package private) static KomData |
cidTable
Table of Content-Id vs local file ref |
(package private) static java.lang.String |
CLO
|
(package private) ServerConfig |
config
Configuration data for this server |
(package private) static NewsGroupData |
curNgd
Data for current newsgroup (Usenet News) |
(package private) static java.lang.String |
DIC
|
(package private) Environment |
environment
Data for the current client |
(package private) Gateway |
gateway
Client supervisor |
(package private) static java.util.Hashtable |
gavePassword
Shows which users have access to specific items |
(package private) static java.lang.String |
GEN
|
(package private) static java.lang.String |
GRA
|
(package private) static java.lang.String |
GRP
|
(package private) java.lang.String |
inlineCurr
List of files referred to as inline objects |
(package private) Upload[] |
inlines
Inline files |
(package private) static java.lang.String |
INT
|
(package private) static int |
LINE_CUTOFF
Try to keep line length around this |
(package private) static int |
LINE_FUDGE
Allowed variation around LINE_CUTOFF |
(package private) static java.lang.String |
LIS
|
(package private) static KOMutil.LookupTables |
lt
Current lookup tables |
(package private) static int |
MAILIT
|
(package private) static javax.mail.Message.RecipientType[] |
messageRecipientTypeCode
Local recipient type code to JavaMail recipient type code |
(package private) static java.lang.String |
MIM
|
(package private) static java.lang.String |
MOD
|
(package private) static int |
N_RECTY
Number of ordinary recipient types |
(package private) static int |
N_RECTYPECODE
"rec", "cc", "bcc", plus "par" |
(package private) NewsClient |
newsclient
Current NewsClient instance |
(package private) static java.util.Hashtable |
newsClients
|
(package private) KomData |
newsData
News data for current user |
(package private) static java.util.Hashtable |
nntpAuth
Authentication data for NNTP servers |
(package private) static java.lang.String |
NWS
|
(package private) static java.lang.String |
NWSART
|
(package private) static java.util.Hashtable |
objCache
Cache for objects |
(package private) KomData |
oCurr
Current object (usually a message to be sent or shown) |
(package private) static MsgIdTable |
oldnews
News msgids vs local refs |
(package private) static int |
POSTIT
|
(package private) static java.lang.String |
RAT
|
(package private) static int |
REC_BCC
|
(package private) static int |
REC_CC
|
(package private) static int |
REC_TO
|
(package private) static java.lang.String[] |
recTypeCode
Local recipient type code vs String representation |
(package private) static java.lang.String |
REP
|
(package private) HTTPResponse |
response
Response data and methods |
(package private) java.lang.String |
rLoc
Current "location" (object id, from request url) |
(package private) static MsgIdTable |
savednews
News msgids vs saved article text refs |
(package private) java.lang.String |
sCursor
(Main) thread identifier |
(package private) java.lang.String |
servletBase
Prefix in url denoting current servlet |
(package private) javax.servlet.http.HttpSession |
session
HTTP session data |
(package private) static java.lang.String |
THR
|
(package private) KomData |
userData
Data for current user |
(package private) static java.lang.String |
USR
|
(package private) static java.lang.String |
VOT
|
Fields inherited from class kom.gateway.DBHigh |
AdminURL,
cache,
HomeURL,
UsersURL |
Fields inherited from class kom.gateway.DBLow |
absCDBpath,
config,
fSep,
fSeparator,
msgAuth,
msgParts |
Constructor Summary | |
KOMutil(ServerConfig config,
HTTPResponse response,
Gateway gateway)
Class constructor |
Method Summary | |
java.lang.String |
a(java.lang.String ref,
java.lang.String link)
Constructs an HTML link |
boolean |
accessCont(java.lang.String ref)
Checks if current user is allowed to access object contents. |
boolean |
accessCont(java.lang.String ref,
KomData obj)
Checks if current user is allowed to access object contents. |
(package private) boolean |
accessObj(java.lang.String ref,
KomData obj)
Checks if the reference is accessible |
void |
addInfoData(KomData data)
Updates infoData |
KomData |
addrToLocal(javax.mail.internet.InternetAddress a)
Converts an Address to a local reference, or leaves it as is |
void |
changeEnvironment()
Changes environment (associates environment with new user data). |
private void |
cidReplace(java.lang.StringBuffer sb,
int pos)
If there is any img src=.../cid:xxx or a href=.../cid:xxx tag in the buffer, the cid:xxx part will be replaced by a local file name. |
static java.lang.String |
contType(javax.mail.Part p,
java.lang.String dflt,
int part)
Gets the primary or secondary type of a MIME part |
(package private) java.lang.String |
decodeText(java.lang.String s)
Decodes strings encoded according to RFC 2047. |
static boolean |
deleted(KomData ct)
Checks if an item has been marked for deletion |
(package private) java.lang.String |
dispMailMessage(java.lang.String bodyref,
KomData ht,
java.lang.StringBuffer sb)
Displays an email message. |
private void |
doAction()
Adds a client to the gateway if there is no client for this connection. |
static boolean |
equal(java.lang.String s1,
java.lang.String s2)
Compares strings, null-safe |
private boolean |
excluded(KomData obj)
Finds out if current user has been excluded from an activity. |
java.lang.String |
fetchNews(java.lang.String act)
Fetches news for the current user in the current activity. |
protected java.io.InputStream |
findId(java.lang.String id)
Tries to find the object corresponding to a "mailbox" id. |
protected java.io.InputStream |
findId(java.lang.String id,
boolean recurse)
Tries to find the object corresponding to a "mailbox" id. |
KomData |
findlocal(java.lang.String email)
Finds a local recipient |
java.lang.String |
findLogin(java.lang.String loginid)
Finds a user from login id |
(package private) java.lang.String |
findOwner(java.lang.String id)
Finds out "who owns" an object |
java.lang.String |
findUser(java.lang.String user)
Finds info data for a user. |
(package private) java.lang.String |
getActId(java.lang.String id)
Gets activity id from an object reference. |
KomData |
getcont(java.lang.String ref)
Gets a contents table, no access control. |
KomData |
getcont(java.lang.String ref,
KomData obj)
Gets a contents table. |
java.util.Vector |
getcontV(java.lang.String ref)
Gets a contents Vector, no access control. |
java.util.Vector |
getcontV(java.lang.String ref,
KomData obj)
Gets a contents Vector. |
NewsGroupData |
getCurNgd()
Gets current NewsGroupData instance |
KomData |
getmemb(java.lang.String ref,
KomData obj)
Gets a member table. |
(package private) java.util.Vector |
getMsgParts(KomData obj)
|
(package private) java.lang.String |
getMsgText(javax.mail.internet.MimePart part,
int pn)
Gets the text of the n-th part of a multipart. |
KomData |
getNews(java.lang.String ref)
Gets news data from an (activity) object. |
static java.lang.String[] |
getNewsAuth(java.lang.String nntp)
Finds {user id, password} for access of an NNTP server. |
KomData |
getobj(java.lang.String ref)
Gets data for an object. |
KomData |
getobject(java.lang.String ref)
Gets data for an object, no access checking. |
KomData |
getold(java.lang.String ref)
Gets old data for an object |
java.lang.String |
getParent(java.lang.String ref)
Gets the next higher level from a reference string |
java.lang.String |
getPart(java.lang.String ref)
Gets the last level from a reference string |
java.lang.String |
getSimpleFileName(javax.mail.Part p)
Gets a filename for a (Message) Part, with directory information stripped. |
java.lang.String |
getSimpleFileName(java.lang.String fn)
Strips directory information from a file path The name is converted to HTML-safe form |
java.io.InputStream |
getStream(java.lang.String s)
Converts a String to a ByteArrayInputStream, updating the response headers in preparation to sending the data. |
java.lang.String |
getTail(java.lang.String ref)
Gets the part after the last / in a path/ref |
(package private) java.lang.String |
getTextPart(KomData obj)
|
java.lang.String |
getVal(java.lang.String key)
Gets a value from arglist, a String of key=value pairs, delimited by && or end of string. |
java.lang.String |
getVal(java.lang.String list,
java.lang.String key,
java.lang.String delim)
Gets a value from a String of key=value pairs, delimited by delim or end of string. |
private boolean |
isAllowed(KomData obj,
java.lang.String type)
Checks if current user is allowed to access an object, based on membership. |
boolean |
isarg(java.lang.String arg)
Checks if a specific argument was given in the current URL argument list. |
boolean |
isMember(java.lang.String act)
Finds out if current user is a member of an activity. |
boolean |
isOrganizer(KomData obj)
Finds out if current user har organizer privileges for an object. |
boolean |
isOrganizer(java.lang.String ref)
Finds out if current user har organizer privileges for an object. |
(package private) static boolean |
ispunct(char c)
Checks for "punctuation" characters |
boolean |
isType(KomData ht,
java.lang.String type)
Checks if an object is of a certain type |
boolean |
isValidEmailAddress(java.lang.String a)
Attempts to check a purported e-mail address string for validity |
boolean |
loggedIn()
Checks if current user is logged in. |
java.lang.String |
mailDate(java.util.Date d)
Formats a Date according to standard mail date format. |
java.lang.String |
mailDate(java.util.Date d,
java.lang.String fmt)
Formats Date like "Wed, 7 Oct 1998 13:02:20 +0200" (standard e-mail format) |
(package private) javax.mail.internet.MimeMessage |
mimeMessage(java.lang.String id,
java.lang.String part,
java.io.File f)
Creates a MimeMessage object from database data |
(package private) java.io.InputStream |
mimeMessageStream(java.lang.String id,
java.lang.String part,
java.io.File f)
Gets an InputStream for a message from database data |
java.lang.String |
mkdate(java.lang.String longdate)
Makes a formatted date/time of a time in decimal form |
java.lang.String |
mkdate(java.lang.String longdate,
java.lang.String format)
Makes a formatted date/time of a time in decimal form |
(package private) static java.lang.String |
noQuote(java.lang.String s)
Replaces any quote (") char by ". |
(package private) void |
parseArglist(java.lang.String sep)
Parses arglist into argtab. |
(package private) java.util.Hashtable |
parseArgs(java.lang.String list,
java.lang.String sep)
Parses a String into key[=value] parts and places those in a Hashtable. |
void |
setCids(java.lang.String cid,
java.lang.String pid,
java.lang.String partName)
Updates cidCurr table of Content-Id and/or Content-Location references and also the table in the current object. |
static void |
setNewsAuth(java.lang.String nntp,
java.lang.String user,
java.lang.String pass)
Sets up table of user/pass data per NNTP server. |
(package private) void |
setValidMsgPwd(java.lang.String id,
java.lang.String uid)
Records a user as having access to an object. |
void |
showBody(javax.mail.Part p,
java.lang.String level,
java.lang.StringBuffer sb,
java.lang.String makeTag)
Shows the body (text) of a Message (Part) |
private void |
showHeader(java.lang.String name,
javax.mail.Address[] value,
java.lang.StringBuffer sb)
Shows a header line with an Address[] value |
private void |
showHeader(java.lang.String name,
java.lang.String value,
java.lang.StringBuffer sb)
Shows a header line with a String value |
private int |
showHeaders(javax.mail.Part p,
boolean top,
java.lang.StringBuffer sb)
Shows the header fields of a Part |
void |
showInputStream(javax.mail.Part p,
java.io.InputStream b,
java.lang.StringBuffer sb,
java.lang.String makeTag,
java.lang.String level)
Shows a general simple body (InputStream of data) |
java.lang.String |
showMailMessage(javax.mail.internet.MimeMessage msg,
java.lang.StringBuffer sb)
Displays a message in the current buffer |
void |
showMessage(javax.mail.Message msg,
java.lang.String level,
java.lang.StringBuffer sb)
Shows an embedded Message |
void |
showMultipart(javax.mail.Part pp,
javax.mail.Multipart b,
java.lang.String level,
java.lang.StringBuffer sb)
Shows a Multipart |
(package private) java.lang.String |
toString(java.io.InputStream inp)
Creates a String from an InputStream |
static java.lang.String |
transbody(java.lang.String body)
Translates special characters in a string, usually a plain message text, to HTML entities. |
private void |
urlexpand(java.lang.StringBuffer sb,
java.lang.String bt,
int pos)
Shows http://url as real link |
(package private) boolean |
userGavePassword(java.lang.String id)
Checks if current user is recorded to have given the correct password for access of an object. |
(package private) boolean |
userGavePassword(java.lang.String id,
java.lang.String uid)
Checks if user is recorded to have given the correct password for access of an object. |
(package private) static java.lang.String |
wrap(java.lang.String text,
boolean cr_and_lf)
Tries to wrap long lines into shorter lines. |
Methods inherited from class kom.gateway.DBHigh |
addContent,
addContent,
addDraft,
addInfo,
addLast,
addMember,
addNews,
addObj,
addObj,
addObject,
addObject,
addQuery,
cleanDrafts,
contentCount,
createNews,
depth,
expungeRef,
findContent,
findDraft,
findDraftData,
findInfo,
findMemb,
findNews,
findObject,
findObject,
findQuery,
getFormContents,
getQryDefault,
getQueries,
getseq,
getStringValues,
getValues,
invalidateCount,
isEmpty,
isStandard,
listDraft,
makeArea,
modObject,
msgExists,
nextDraft,
queryExists,
ref2path,
refExists,
removeDraft,
removeQuery,
replaceObject,
Stream2String,
String2Stream,
StringBuffer2Stream,
updateCount,
updCount,
updref,
updseq |
Methods inherited from class kom.gateway.DBLow |
accessPart,
addFile,
areaExists,
basedRef,
createArea,
debugLog,
errorLog,
expungeFile,
File2Stream,
File2String,
findPart,
getFile,
getFileContents,
getFileStream,
getPath,
getStandard,
isMailSpool,
lastModified,
length,
listFiles,
makePart,
msgPartStream,
partfile,
partpath,
printStackTrace,
readObject,
removeFile,
replaceMime,
updseq1,
validate,
validate,
writeObject |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final java.lang.String CAT
static final java.lang.String ACT
static final java.lang.String USR
static final java.lang.String GRP
static final java.lang.String THR
static final java.lang.String REP
static final java.lang.String CLO
static final java.lang.String BOK
static final java.lang.String MOD
static final java.lang.String CHA
static final java.lang.String GRA
static final java.lang.String RAT
static final java.lang.String DIC
static final java.lang.String VOT
static final java.lang.String GEN
static final java.lang.String INT
static final java.lang.String LIS
static final java.lang.String NWS
static final java.lang.String NWSART
static final java.lang.String MIM
static final int MAILIT
static final int POSTIT
java.lang.String argsep
Upload[] attachments
Upload[] inlines
static java.util.Hashtable objCache
static java.util.Hashtable nntpAuth
static KomData cidTable
static java.util.Hashtable gavePassword
java.lang.String inlineCurr
static final java.lang.String BOUNDARYSTART
static final int REC_TO
static final int REC_CC
static final int REC_BCC
static final int N_RECTY
static final java.lang.String[] recTypeCode
static final int N_RECTYPECODE
static final javax.mail.Message.RecipientType[] messageRecipientTypeCode
static java.util.Hashtable newsClients
static MsgIdTable oldnews
static MsgIdTable savednews
NewsClient newsclient
ServerConfig config
java.lang.String servletBase
HTTPResponse response
javax.servlet.http.HttpSession session
Gateway gateway
Environment environment
java.lang.String sCursor
KomData userData
KomData newsData
static KOMutil.LookupTables lt
java.lang.String rLoc
java.lang.String arglist
java.util.Hashtable argtab
static NewsGroupData curNgd
KomData oCurr
boolean anyAccess
static final int LINE_CUTOFF
static final int LINE_FUDGE
Constructor Detail |
public KOMutil(ServerConfig config, HTTPResponse response, Gateway gateway)
config
- Server configuration dataresponse
- HTTP response objectgateway
- Reference to client supervisorMethod Detail |
public NewsGroupData getCurNgd()
public static void setNewsAuth(java.lang.String nntp, java.lang.String user, java.lang.String pass)
nntp
- NNTP reference to server ("domain:port")user
- User namepass
- User passwordpublic static java.lang.String[] getNewsAuth(java.lang.String nntp)
nntp
- NNTP server reference ("domain:port")void setValidMsgPwd(java.lang.String id, java.lang.String uid)
id
- Object iduid
- User idboolean userGavePassword(java.lang.String id)
id
- Object idboolean userGavePassword(java.lang.String id, java.lang.String uid)
id
- Object iduid
- User idpublic boolean isarg(java.lang.String arg)
arg
- Argument (key)public java.lang.String getVal(java.lang.String key)
key
- Key (name) of valuepublic java.lang.String getVal(java.lang.String list, java.lang.String key, java.lang.String delim)
list
- String of key=value pairs. Values may be quoted ("value")key
- Key (name) of valuedelim
- Delimiter stringpublic boolean loggedIn()
private void doAction()
public void changeEnvironment()
public KomData getobject(java.lang.String ref)
ref
- Object referencepublic KomData getobj(java.lang.String ref)
ref
- Object referenceboolean accessObj(java.lang.String ref, KomData obj)
ref
- Referenceobj
- Validating objectjava.lang.String getActId(java.lang.String id)
id
- Some referencepublic KomData getmemb(java.lang.String ref, KomData obj)
ref
- Object whose members are soughtobj
- Access control objectpublic KomData getcont(java.lang.String ref)
ref
- Object whose contents are soughtpublic KomData getcont(java.lang.String ref, KomData obj)
ref
- Object whose contents are soughtobj
- Access control objectpublic java.util.Vector getcontV(java.lang.String ref)
ref
- Object whose contents are soughtpublic java.util.Vector getcontV(java.lang.String ref, KomData obj)
ref
- Object whose contents are soughtobj
- Access control objectpublic boolean accessCont(java.lang.String ref)
ref
- Object referencepublic boolean accessCont(java.lang.String ref, KomData obj)
ref
- Object referenceobj
- Access control object, or nullprivate boolean isAllowed(KomData obj, java.lang.String type)
obj
- Reference object for membership controltype
- Type of membership ("rec*" or "adm*")public boolean isOrganizer(java.lang.String ref)
ref
- Object referencepublic boolean isOrganizer(KomData obj)
obj
- Object referencepublic KomData getNews(java.lang.String ref)
ref
- Object referencepublic boolean isMember(java.lang.String act)
act
- Activity referencepublic java.lang.String fetchNews(java.lang.String act)
act
- Activity referencepublic KomData getold(java.lang.String ref)
ref
- Object referenceprivate boolean excluded(KomData obj)
obj
- Activity objectpublic static boolean deleted(KomData ct)
ct
- A contents recordpublic java.lang.String getParent(java.lang.String ref)
ref
- Reference string of the form /.../xxx/public java.lang.String getPart(java.lang.String ref)
ref
- Reference string of the form /.../ppp/public java.lang.String getTail(java.lang.String ref)
ref
- Reference string of the form /.../tailpublic void addInfoData(KomData data)
data
- Encoded value pairspublic java.lang.String findLogin(java.lang.String loginid)
loginid
- Login id ("short name")public java.lang.String findUser(java.lang.String user)
user
- User reference Stringprotected final java.io.InputStream findId(java.lang.String id)
id
- Short id, the "mailbox" part of a presumed
local mail address, possibly with "-owner" or
"-request" appended.protected final java.io.InputStream findId(java.lang.String id, boolean recurse)
id
- Short id, the "mailbox" part of a presumed
local mail addressrecurse
- True if id should be checked with any
trailing "-owner" or "-request" removedjava.lang.String findOwner(java.lang.String id)
id
- Object idpublic java.io.InputStream getStream(java.lang.String s)
s
- String to be convertedpublic boolean isType(KomData ht, java.lang.String type)
ht
- Object datatype
- Type stringpublic static java.lang.String transbody(java.lang.String body)
body
- String to be translatedstatic java.lang.String wrap(java.lang.String text, boolean cr_and_lf)
text
- String containing one or more linescr_and_lf
- If true, use CRLF for end of line, otherwise just LFstatic final boolean ispunct(char c)
c
- Characterjava.lang.String dispMailMessage(java.lang.String bodyref, KomData ht, java.lang.StringBuffer sb)
bodyref
- Reference to messageht
- Internal (KOMmsg) representation of messagesb
- StringBuffer where message text will be appendedpublic java.lang.String showMailMessage(javax.mail.internet.MimeMessage msg, java.lang.StringBuffer sb)
msg
- MimeMessage objectsb
- String buffer to updatejava.util.Vector getMsgParts(KomData obj)
java.lang.String getMsgText(javax.mail.internet.MimePart part, int pn)
part
- MimePartpn
- Part #java.lang.String getTextPart(KomData obj)
javax.mail.internet.MimeMessage mimeMessage(java.lang.String id, java.lang.String part, java.io.File f)
id
- Base ref for messagepart
- E g "text" for the full message textf
- If defined, retrieve data from this filejava.io.InputStream mimeMessageStream(java.lang.String id, java.lang.String part, java.io.File f)
id
- Base ref for messagepart
- E g "text" for the full message textf
- If defined, retrieve data from this fileprivate void cidReplace(java.lang.StringBuffer sb, int pos)
sb
- StringBufferpos
- Where substitution may beginpublic void showBody(javax.mail.Part p, java.lang.String level, java.lang.StringBuffer sb, java.lang.String makeTag)
p
- Part referencelevel
- String of the form "0[.m[.n...]", example: "2.3" for
third part of a Multipart message which is part 2 of
the main message.sb
- String buffer to updatemakeTag
- If it has a value, make a reference tag if relevantprivate void urlexpand(java.lang.StringBuffer sb, java.lang.String bt, int pos)
sb
- StringBuffer for appending textbt
- Textpos
- Position in text of "://"private int showHeaders(javax.mail.Part p, boolean top, java.lang.StringBuffer sb)
p
- Part referencetop
- true if top levelsb
- String buffer to updateprivate void showHeader(java.lang.String name, java.lang.String value, java.lang.StringBuffer sb)
name
- Header namevalue
- Header valuesb
- String buffer to updateprivate void showHeader(java.lang.String name, javax.mail.Address[] value, java.lang.StringBuffer sb)
name
- Header namevalue
- Header valuesb
- String buffer to updatepublic KomData addrToLocal(javax.mail.internet.InternetAddress a)
a
- javax.mail.InternetAddresspublic KomData findlocal(java.lang.String email)
email
- E-mail addresspublic void showMultipart(javax.mail.Part pp, javax.mail.Multipart b, java.lang.String level, java.lang.StringBuffer sb)
pp
- Part referenceb
- Multipart bodylevel
- String of the form "0[.m[.n...]", example: "2.3" for
third part of a Multipart message which is part 2 of
the main message.sb
- String buffer to updatepublic static final java.lang.String contType(javax.mail.Part p, java.lang.String dflt, int part)
p
- Partdflt
- Default subtype valuepart
- 1 for first part, 2 for second partpublic void showMessage(javax.mail.Message msg, java.lang.String level, java.lang.StringBuffer sb)
msg
- Messagelevel
- String of the form "0[.m[.n...]", example: "2.3" for
third part of a Multipart message which is part 2 of
the main message.sb
- String buffer to updatepublic void showInputStream(javax.mail.Part p, java.io.InputStream b, java.lang.StringBuffer sb, java.lang.String makeTag, java.lang.String level)
p
- Part referenceb
- InputStream representing the bodysb
- String buffer to updatemakeTag
- If it has a value, make a reference tag if relevantlevel
- String of the form "0[.m[.n...]", example: "2.3" for
third part of a Multipart message which is part 2 of
the main message.public void setCids(java.lang.String cid, java.lang.String pid, java.lang.String partName)
partName
.cid
- Content-Id valuepid
- Content-Location valuepartName
- (File) name (url) to go with either.public java.lang.String a(java.lang.String ref, java.lang.String link)
ref
- URLlink
- Link textpublic java.lang.String mkdate(java.lang.String longdate, java.lang.String format)
longdate
- Date and time in internal form, string representation,
seconds since epoch startformat
- Code for time format: "m" for standard mail format,
"sm" for short mail format, empty for default format.public java.lang.String mkdate(java.lang.String longdate)
longdate
- Date and time in internal form, string representation,
seconds since epoch startpublic java.lang.String mailDate(java.util.Date d, java.lang.String fmt)
d
- Date to be formattedfmt
- Format codepublic java.lang.String mailDate(java.util.Date d)
d
- Datepublic boolean isValidEmailAddress(java.lang.String a)
a
- An e-mail address string, if validjava.lang.String decodeText(java.lang.String s)
s
- String with possible encoding (=?ISO-xxx ... =)public java.lang.String getSimpleFileName(javax.mail.Part p)
public java.lang.String getSimpleFileName(java.lang.String fn)
fn
- File pathjava.lang.String toString(java.io.InputStream inp)
inp
- InputStreampublic static final boolean equal(java.lang.String s1, java.lang.String s2)
s1
- First Strings2
- Second Stringfinal void parseArglist(java.lang.String sep)
sep
- Argument separatorjava.util.Hashtable parseArgs(java.lang.String list, java.lang.String sep)
list
- String of key=value or just key, separated by sepsep
- Delimiter between keys or key=value pairs.static java.lang.String noQuote(java.lang.String s)
s
- String
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |