public class TextDocument extends Object
Modifier and Type | Field and Description |
---|---|
StringBuilder |
sb
the internal StringBuilder
|
Constructor and Description |
---|
TextDocument(Resource resource,
CaptureSearchResult result,
ResultURIConverter uriConverter) |
Modifier and Type | Method and Description |
---|---|
void |
addBase() |
byte[] |
getBytes() |
String |
getCharSet() |
String |
getJSIncludeString(String jsUrl) |
String |
includeJspString(String jspPath,
javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse,
WaybackRequest wbRequest,
CaptureSearchResults results,
CaptureSearchResult result,
Resource resource) |
void |
insertAtEndOfBody(CharSequence toInsert) |
void |
insertAtEndOfDocument(CharSequence charSequence) |
void |
insertAtStartOfBody(CharSequence toInsert) |
void |
insertAtStartOfDocument(CharSequence toInsert)
insert
toInsert at the beginning of this text. |
void |
insertAtStartOfHead(CharSequence toInsert) |
void |
readFully()
Read bytes from input stream, using best-guess for character encoding
|
void |
readFully(String charSet) |
void |
resolveAllPageUrls()
Update all URLs inside the page, so they resolve correctly to absolute
URLs within the Wayback service.
|
void |
resolveASXRefUrls() |
void |
resolveCSSUrls() |
void |
resolvePageUrls()
Update URLs inside the page, so those URLs which must be correct at
page load time resolve correctly to absolute URLs.
|
void |
setCharSet(String charSet) |
void |
setResultBytes(byte[] resultBytes) |
void |
stripHTML() |
void |
writeToOutputStream(OutputStream os)
Write the contents of the page to the client.
|
public StringBuilder sb
public TextDocument(Resource resource, CaptureSearchResult result, ResultURIConverter uriConverter)
resource
- result
- uriConverter
- public void addBase()
public void resolvePageUrls()
public void resolveAllPageUrls()
public void resolveCSSUrls()
public void resolveASXRefUrls()
public void stripHTML()
public void readFully(String charSet) throws IOException
charSet
- IOException
public void readFully() throws IOException
IOException
public byte[] getBytes() throws UnsupportedEncodingException
UnsupportedEncodingException
public void setResultBytes(byte[] resultBytes)
public void writeToOutputStream(OutputStream os) throws IOException
os
- IOException
public final void insertAtStartOfDocument(CharSequence toInsert)
toInsert
at the beginning of this text.toInsert
- public void insertAtEndOfDocument(CharSequence charSequence)
charSequence
- public void insertAtStartOfHead(CharSequence toInsert)
toInsert
- public void insertAtEndOfBody(CharSequence toInsert)
toInsert
- public void insertAtStartOfBody(CharSequence toInsert)
toInsert
- public String includeJspString(String jspPath, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, WaybackRequest wbRequest, CaptureSearchResults results, CaptureSearchResult result, Resource resource) throws javax.servlet.ServletException, IOException
jspPath
- httpRequest
- httpResponse
- wbRequest
- results
- result
- resource
- IOException
javax.servlet.ServletException
public String getJSIncludeString(String jsUrl)
jsUrl
- The javascript URL to be wrapped<script>
tag containing the provided javascript URL.public String getCharSet()
public void setCharSet(String charSet)
charSet
- the charSet to setCopyright © 2005–2015 IIPC. All rights reserved.