Skip to content

Commit

Permalink
JCR-3410 - making readFile() and getLastModifed() methods static in J…
Browse files Browse the repository at this point in the history
…crUtils

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1372899 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
justinedelson committed Aug 14, 2012
1 parent a1ad759 commit 78c9eb0
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -668,7 +668,7 @@ public static Node putFile(
* @return stream for reading the file contents
* @throws RepositoryException if the file can not be accessed
*/
public InputStream readFile(Node node) throws RepositoryException {
public static InputStream readFile(Node node) throws RepositoryException {
if (node.hasProperty(Property.JCR_DATA)) {
Property data = node.getProperty(Property.JCR_DATA);
final Binary binary = data.getBinary();
Expand Down Expand Up @@ -698,7 +698,7 @@ public void close() throws IOException {
* @throws RepositoryException if the file can not be accessed
* @throws IOException if the file can not be read or written
*/
public void readFile(Node node, OutputStream output)
public static void readFile(Node node, OutputStream output)
throws RepositoryException, IOException {
InputStream input = readFile(node);
try {
Expand All @@ -723,7 +723,7 @@ public void readFile(Node node, OutputStream output)
* @return last modified date, or <code>null</code> if not available
* @throws RepositoryException if the last modified date can not be accessed
*/
public Calendar getLastModified(Node node) throws RepositoryException {
public static Calendar getLastModified(Node node) throws RepositoryException {
if (node.hasProperty(Property.JCR_LAST_MODIFIED)) {
return node.getProperty(Property.JCR_LAST_MODIFIED).getDate();
} else if (node.hasNode(Node.JCR_CONTENT)) {
Expand All @@ -743,7 +743,7 @@ public Calendar getLastModified(Node node) throws RepositoryException {
* @param date modified date
* @throws RepositoryException if the last modified date can not be set
*/
public void setLastModified(Node node, Calendar date) throws RepositoryException {
public static void setLastModified(Node node, Calendar date) throws RepositoryException {
if (node.hasNode(Node.JCR_CONTENT)) {
setLastModified(node.getNode(Node.JCR_CONTENT), date);
} else {
Expand Down

0 comments on commit 78c9eb0

Please sign in to comment.