/**
* Creates an input stream to read the file content from.
*/
InputStream getInputStream(long filePointer) throws IOException
{
final ChannelSftp channel = fileSystem.getChannel();
try
{
// hmmm - using the in memory method is soooo much faster ...
// TODO - Don't read the entire file into memory. Use the
// stream-based methods on ChannelSftp once they work properly final
// .... no stream based method with resume???
ByteArrayOutputStream outstr = new ByteArrayOutputStream();
try
{
channel.get(getName().getPathDecoded(), outstr, null,
ChannelSftp.RESUME, filePointer);
}
catch (SftpException e)
{
throw new FileSystemException(e);