Anonymous | Login | Signup for a new account | 12-17-2024 14:41 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0003350 | [Resin] | minor | always | 02-22-09 12:51 | 07-25-11 15:21 | ||||
Reporter | karlgold | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.1.6 | ||||||
Summary | 0003350: com.caucho.vfs.BufferedReaderAdapter ignores mark() and reset() | ||||||||
Description |
I tried something like the following on a request with some body content: char[] buffer = new char[READ_AHEAD_LIMIT]; BufferedReader reader = request.getReader(); boolean ready = reader.ready(); if (ready) { reader.mark(READ_AHEAD_LIMIT); reader.read(buffer); ready = reader.ready(); // result == FALSE reader.reset(); boolean notReady = reader.ready(); // result should be TRUE, but is FALSE } Looking at BufferedReaderAdapter, read() and ready() are delegated to the underlying ReadStream, but mark() and reset() are not. Calling them has not effect on the ReadStream. Workaround is to wrap the reader obtained from the request in yet another BufferedReader, but it would be better if request.getReader() returned a fully functional BufferedReader. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed. 26 unique queries executed. |