[
https://issues.apache.org/jira/browse/VFS-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bernd Eckenfels resolved VFS-355.
---------------------------------
Resolution: Fixed
> RamFileProvider: ReadingRamFileRandomAccessContent InputStream of file does
> not return -1 when empty...
> -------------------------------------------------------------------------------------------------------
>
> Key: VFS-355
> URL: https://issues.apache.org/jira/browse/VFS-355
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.0
> Environment: N/A
> Reporter: Miroslav Pokorny
> Fix For: 2.1
>
>
> RamFileRandomAccessContent
> public int read(byte b[], int off, int len) throws IOException
> {
> int retLen = Math.min(len, getLeftBytes());
> RamFileRandomAccessContent.this.readFully(b,
> off, retLen);
> return retLen;
> }
> Notice retLen should return 1 if getLeftBytes() returns 0 but it doesnt. When
> empty it simply returns 0 which means if one reads until -1 it never
> happens...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)