| 9 | } |
| 10 | |
| 11 | int JSUFileInputStream::readData(void* buffer, long byteCount) |
| 12 | { |
| 13 | int readBytes = 0; |
| 14 | if (((JKRFile*)mObject)->isAvailable()) { |
| 15 | if ((u32)(mLength + byteCount) > ((JKRFile*)mObject)->getFileSize()) { |
| 16 | byteCount = ((JKRFile*)mObject)->getFileSize() - mLength; |
| 17 | } |
| 18 | if (byteCount > 0) { |
| 19 | readBytes = ((JKRFile*)mObject)->readData(buffer, byteCount, mLength); |
| 20 | if (readBytes < 0) { |
| 21 | return 0; |
| 22 | } else { |
| 23 | mLength += readBytes; |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | return readBytes; |
| 28 | } |
| 29 | |
| 30 | int JSUFileInputStream::seekPos(long offset, JSUStreamSeekFrom mode) |
| 31 | { |
nothing calls this directly
no test coverage detected