org.apache.naming.resources

Class FileDirContext.FileResource

Enclosing Class:
FileDirContext

protected class FileDirContext.FileResource
extends Resource

This specialized resource implementation avoids opening the IputStream to the file right away (which would put a lock on the file).

Field Summary

protected File
file
Associated file object.
protected long
length
File length.

Fields inherited from class org.apache.naming.resources.Resource

binaryContent, inputStream

Constructor Summary

FileResource(File file)

Method Summary

InputStream
streamContent()
Content accessor.

Methods inherited from class org.apache.naming.resources.Resource

getContent, setContent, setContent, streamContent

Field Details

file

protected File file
Associated file object.


length

protected long length
File length.

Constructor Details

FileResource

public FileResource(File file)

Method Details

streamContent

public InputStream streamContent()
            throws IOException
Content accessor.
Overrides:
streamContent in interface Resource

Returns:
InputStream


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.