|
||||||||||
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 long |
UNDEFINED_LENGTH
Constant for undefined content length |
static long |
UNDEFINED_TIME
Constant for undefined modification/creation time |
Constructor Summary | |
---|---|
IOUtil()
|
Method Summary | |
---|---|
static String |
buildContentType(String mimeType,
String encoding)
Build a valid content type string from the given mimeType and encoding: <mimeType>; charset="<encoding>" If the specified mimeType is null , null is returned. |
static String |
getCreated(long createdTime)
Return the creation time as formatted string. |
static String |
getEncoding(String contentType)
Retrieve the encoding from the specified contentType. |
static String |
getLastModified(long modificationTime)
Return the last modification time as formatted string. |
static String |
getMimeType(String contentType)
Retrieve the mimeType from the specified contentType. |
static File |
getTempFile(InputStream inputStream)
Builds a new temp. file from the given input stream. |
static Node |
mkDirs(Node root,
String relPath,
String dirNodeType)
Recursively creates nodes below the specified root node. |
static void |
spool(InputStream in,
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
Constructor Detail |
---|
public IOUtil()
Method Detail |
---|
public static String getLastModified(long modificationTime)
HttpDateFormat.modificationDateFormat()
public static String getCreated(long createdTime)
HttpDateFormat.creationDateFormat()
public static void spool(InputStream in, OutputStream out) throws IOException
in
- out
-
IOException
public static String buildContentType(String mimeType, String encoding)
<mimeType>; charset="<encoding>"If the specified mimeType is
null
, null
is returned.
mimeType
- encoding
-
null
if the specified mimeType is
null
public static String getMimeType(String contentType)
contentType
-
null
public static String getEncoding(String contentType)
contentType
-
null
if the specified contentType is
null
or does not define a charset.public static File getTempFile(InputStream inputStream) throws IOException
inputStream
- the input stream
null
if the specified input is
null
.
IOException
public static Node mkDirs(Node root, String relPath, String dirNodeType) throws RepositoryException
root
- relPath
-
RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |