|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.server.io.IOUtil
public class IOUtil
IOUtil provides utitily methods used for import and export
operations.
| Field Summary | |
|---|---|
static MimeResolver |
MIME_RESOLVER
MimeType resolver used to retrieve the mimetype if no content type is available during import. |
static long |
UNDEFINED_LENGTH
Constant for undefined content length |
static long |
UNDEFINED_TIME
Constant for undefined modification/creation time |
| Constructor Summary | |
|---|---|
IOUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
buildContentType(java.lang.String mimeType,
java.lang.String encoding)
Build a valid content type string from the given mimeType and encoding: |
static java.lang.String |
getCreated(long createdTime)
Return the creation time as formatted string. |
static java.lang.String |
getEncoding(java.lang.String contentType)
Retrieve the encoding from the specified contentType. |
static java.lang.String |
getLastModified(long modificationTime)
Return the last modification time as formatted string. |
static java.lang.String |
getMimeType(java.lang.String contentType)
Retrieve the mimeType from the specified contentType. |
static java.io.File |
getTempFile(java.io.InputStream inputStream)
Builds a new temp. |
static javax.jcr.Node |
mkDirs(javax.jcr.Node root,
java.lang.String relPath,
java.lang.String dirNodeType)
Recursively creates nodes below the specified root node. |
static void |
spool(java.io.InputStream in,
java.io.OutputStream out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long UNDEFINED_TIME
public static final long UNDEFINED_LENGTH
public static final MimeResolver MIME_RESOLVER
| Constructor Detail |
|---|
public IOUtil()
| Method Detail |
|---|
public static java.lang.String getLastModified(long modificationTime)
DavConstants.modificationDateFormatpublic static java.lang.String getCreated(long createdTime)
DavConstants.creationDateFormat
public static void spool(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
in - out -
java.io.IOException
public static java.lang.String buildContentType(java.lang.String mimeType,
java.lang.String encoding)
<mimeType>; charset="<encoding>"If the specified mimeType is
null, null is returned.
mimeType - encoding -
null if the specified mimeType is
nullpublic static java.lang.String getMimeType(java.lang.String contentType)
contentType -
nullpublic static java.lang.String getEncoding(java.lang.String contentType)
contentType -
null if the specified contentType is
null or does not define a charset.
public static java.io.File getTempFile(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - the input stream
null if the specified input is
null.
java.io.IOException
public static javax.jcr.Node mkDirs(javax.jcr.Node root,
java.lang.String relPath,
java.lang.String dirNodeType)
throws javax.jcr.RepositoryException
root - relPath -
javax.jcr.RepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||