JuliaLang/julia — pull request #3656 by kmsquire (2013-07-09 08:05:39+00:00)
Title: WIP: mark/unmark/seekmark for IOBuffer + BufferedReader (addresses #2638)

This pull request currently implements:

1) a `BufferedReader` type, based loosely on Java's `BufferedReader`, which wraps an `IO` object and implements `mark()`, `unmark()`, and `seekmark()` for that type (see below)
2) `mark()`, `unmark()`, and `seekmark()` directly for `IOBuffer` and `AsyncStream`

These are loosely based on Java's BufferedReader, which allows a programmer to mark a location in an IO stream, and then seek back to that location later, even if the IO stream itself is not seekable:

```
mark(b::BufferedReader) - marks a position in the wrapped IO object
seekmark(b::BufferedReader) - seeks to a marked position; the mark is not removed
unmark(b::BufferedReader) - removes a mark
```

See #2638 for further discussion.

Currently a work in progress, pending more testing.