ReadAt reads from the current offset+off into p, wrapping at Cap()
(p []byte, off int64)
| 68 | |
| 69 | // ReadAt reads from the current offset+off into p, wrapping at Cap() |
| 70 | func (wpr *Wrapper) ReadAt(p []byte, off int64) (n int, err error) { |
| 71 | wrap := NewWrapReader(wpr.rwa, wpr.O+off, wpr.N) |
| 72 | r := io.LimitReader(wrap, wpr.L-off) |
| 73 | return r.Read(p) |
| 74 | } |
| 75 | |
| 76 | // Write writes p to the end of the Wrapper (at Len()), wrapping at Cap() |
| 77 | func (wpr *Wrapper) Write(p []byte) (n int, err error) { |