comparison src/org/tmatesoft/hg/internal/FilterDataAccess.java @ 421:fdd7d756dea0 v0.8.5

Allow IOException from DataAccess methods for subclasses with non-trivial implementations, to avoid exception dumps when inapropriate
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 22 Mar 2012 23:09:11 +0100
parents 6c22bdc0bdfd
children 92c3ad9c2a51
comparison
equal deleted inserted replaced
420:6c22bdc0bdfd 421:fdd7d756dea0
37 this.offset = offset; 37 this.offset = offset;
38 this.length = length; 38 this.length = length;
39 count = length; 39 count = length;
40 } 40 }
41 41
42 protected int available() { 42 protected int available() throws IOException {
43 return count; 43 return count;
44 } 44 }
45 45
46 @Override 46 @Override
47 public FilterDataAccess reset() throws IOException { 47 public FilterDataAccess reset() throws IOException {
48 count = length; 48 count = length;
49 return this; 49 return this;
50 } 50 }
51 51
52 @Override 52 @Override
53 public boolean isEmpty() { 53 public boolean isEmpty() throws IOException {
54 return count <= 0; 54 return count <= 0;
55 } 55 }
56 56
57 @Override 57 @Override
58 public int length() { 58 public int length() throws IOException {
59 return length; 59 return length;
60 } 60 }
61 61
62 @Override 62 @Override
63 public void seek(int localOffset) throws IOException { 63 public void seek(int localOffset) throws IOException {