|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jp.ne.dti.lares.foozy.pagemixer.page.MonoPage
Page information accessing for 'mono' page.
This class treats the model of page that:
For example:
'/somepage.ja.html' page in your web application
(1)has 'text/html; charset=Windows-31J' content,
(2)is encoded in "Windows-31J
" in local file system,
and (3)has locale insensitive content.
Fields inherited from interface jp.ne.dti.lares.foozy.pagemixer.page.Page |
DEFAULT_ENCODING |
Constructor Summary | |
MonoPage(java.lang.String contentType)
Constructor. |
|
MonoPage(java.lang.String location,
java.lang.String contentType)
Constructor. |
|
MonoPage(java.lang.String location,
java.lang.String contentType,
java.lang.String encoding)
Constructor. |
Method Summary | |
void |
close(java.lang.Object descriptor)
Does nothing because no resource requires release. |
void |
expire(long limit)
Expire old page entries. |
java.lang.String |
getContentType(java.lang.Object descriptor)
Return fixed content type specified at construction time. |
java.lang.String |
getEncoding(java.lang.Object descriptor)
Return fixed encoding specified at construction time. |
java.lang.String |
getLocation(java.lang.Object descriptor)
Return resource location of page. |
PageEntry |
getPageEntry(java.lang.Object descriptor)
Get page entry stored in this object. |
java.lang.Object |
open(java.lang.String location,
java.util.Locale locale)
Return specified location as descriptor object. |
void |
putPageEntry(java.lang.Object descriptor,
PageEntry entry)
Store specified entry into this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MonoPage(java.lang.String location, java.lang.String contentType, java.lang.String encoding)
If null is specified as 'location',
this treats 'location' parameter of open(String, Locale)
as location of page resource.
So, it is recommended to specify 'location' of page explicitly, if:
open(String, Locale)
"Encoding
" is treated as shown below:
getCharSet(contentType)
(this also may be null) is used"default encoding"
You should specify
"default encoding"
explicitly,
if you really want to use runtime environment default encoding.
It is recommended to omit encoding specification (= use encoding specified in content type) for maintenancability, if you write resource out in that encoding.
location
- of page resourcecontentType
- of pageencoding
- to read page resource inpublic MonoPage(java.lang.String contentType)
This is equivalent with
MonoPage(null, contentType, null)
.
public MonoPage(java.lang.String location, java.lang.String contentType)
This is equivalent with
MonoPage(location, contentType, null)
.
Method Detail |
public java.lang.Object open(java.lang.String location, java.util.Locale locale) throws java.io.IOException
open
in interface Page
location
- to symbolize target pagelocale
- of target pageMonoPage(String, String, String)
public void close(java.lang.Object descriptor) throws java.io.IOException
close
in interface Page
descriptor
- of pagepublic java.lang.String getLocation(java.lang.Object descriptor) throws java.io.IOException
getLocation
in interface Page
descriptor
- of pagepublic java.lang.String getContentType(java.lang.Object descriptor) throws java.io.IOException
getContentType
in interface Page
descriptor
- of pagepublic java.lang.String getEncoding(java.lang.Object descriptor) throws java.io.IOException
getEncoding
in interface Page
descriptor
- of pagepublic void putPageEntry(java.lang.Object descriptor, PageEntry entry) throws java.io.IOException
putPageEntry
in interface Page
descriptor
- of pageentry
- to storepublic PageEntry getPageEntry(java.lang.Object descriptor) throws java.io.IOException
getPageEntry
in interface Page
descriptor
- of pagepublic void expire(long limit)
This expire page entry stored in this object, if last accessing timestamp is earlier than specified one.
expire
in interface Page
limit
- milliseconds of last access timestamp
|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |