You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2007/11/08 00:35:50 UTC

[jira] Closed: (SLING-99) Add file-like access to Resource interface

     [ https://issues.apache.org/jira/browse/SLING-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-99.
----------------------------------

    Resolution: Fixed

Added implementations of the new functionality to microsling in Rev. 592952 and to the Sling jcr/resource project in Rev. 592955.

Closing this issue for now.

> Add file-like access to Resource interface
> ------------------------------------------
>
>                 Key: SLING-99
>                 URL: https://issues.apache.org/jira/browse/SLING-99
>             Project: Sling
>          Issue Type: Improvement
>          Components: API
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> As discussed on the dev list, the Resource interface should be added a method
>       InputStream getInputStream() throws IOException;
> This method returns a stream to read from the resource if the resource is able to stream its content. Otherwise null is returned. IOException may be thrown if there is an error creating the InputStream.
> This could for example be used easiliy access the contents of a resource representing a file, such as an nt:file node or an entry in an OSGi bundle.
> In addition, the following standard properties should be defined in the ResourceMetadata class:
>     CONTENT_TYPE = "sling.contentType"
>     CHARACTER_ENCODING = "sling.characterEncoding"
>     CREATION_TIME = "sling.creationTime"  // milliseconds since the epoch
>     MODIFICATION_TIME = "sling.modificationTime"  // milliseconds since the epoch
> These properties are optional and may be set depending on availabilty from the resource. An nt:file based resource could take these values from the respective jcr:content child node properties (if existing).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.