public class ScriptNode.ScriptContentData
extends java.lang.Object
implements org.springframework.extensions.surf.util.Content, java.io.Serializable
| Constructor and Description |
|---|
ScriptNode.ScriptContentData(org.alfresco.service.cmr.repository.ContentData contentData,
org.alfresco.service.namespace.QName property)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Delete the content stream
|
java.lang.String |
getContent() |
java.lang.String |
getDownloadUrl() |
java.lang.String |
getEncoding() |
java.io.InputStream |
getInputStream() |
java.lang.String |
getMimetype() |
java.io.Reader |
getReader() |
long |
getSize() |
java.lang.String |
getUrl() |
void |
guessEncoding()
Guess the character encoding of a file.
|
void |
guessMimetype(java.lang.String filename)
Guess the mimetype for the given filename - uses the extension to match on system mimetype map
|
void |
setContent(java.lang.String content)
Set the content stream
|
void |
setEncoding(java.lang.String encoding) |
void |
setMimetype(java.lang.String mimetype) |
void |
write(org.springframework.extensions.surf.util.Content content)
Set the content stream from another content object.
|
void |
write(org.springframework.extensions.surf.util.Content content,
boolean applyMimetype,
boolean guessEncoding)
Set the content stream from another content object.
|
void |
write(java.io.InputStream inputStream)
Set the content stream from another input stream.
|
public ScriptNode.ScriptContentData(org.alfresco.service.cmr.repository.ContentData contentData,
org.alfresco.service.namespace.QName property)
contentData - The ContentData object this object wrapsproperty - The property the ContentData is attached toopublic java.lang.String getContent()
getContent in interface org.springframework.extensions.surf.util.Contentpublic java.io.InputStream getInputStream()
getInputStream in interface org.springframework.extensions.surf.util.Contentpublic java.io.Reader getReader()
getReader in interface org.springframework.extensions.surf.util.Contentpublic void setContent(java.lang.String content)
content - Content string to setpublic void write(org.springframework.extensions.surf.util.Content content)
content - ScriptContent to setpublic void write(org.springframework.extensions.surf.util.Content content,
boolean applyMimetype,
boolean guessEncoding)
content - ScriptContent to setapplyMimetype - If true, apply the mimetype from the Content object, else leave the original mimetypeguessEncoding - If true, guess the encoding from the underlying input stream, else use encoding set in
the Content object as supplied.public void write(java.io.InputStream inputStream)
inputStream - public void delete()
public java.lang.String getUrl()
public java.lang.String getDownloadUrl()
public long getSize()
getSize in interface org.springframework.extensions.surf.util.Contentpublic java.lang.String getMimetype()
getMimetype in interface org.springframework.extensions.surf.util.Contentpublic java.lang.String getEncoding()
getEncoding in interface org.springframework.extensions.surf.util.Contentpublic void setEncoding(java.lang.String encoding)
public void setMimetype(java.lang.String mimetype)
public void guessMimetype(java.lang.String filename)
public void guessEncoding()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.