(long pos)
| 115 | } |
| 116 | |
| 117 | private void readByteBlock(long pos) { |
| 118 | FileIO f = FileIO.createConnection(fileName); |
| 119 | if (current_block == null) { |
| 120 | current_block = new char[BLOCK_SIZE]; |
| 121 | } |
| 122 | try { |
| 123 | InputStreamReader is = new InputStreamReader(f.openInputStream(), "UTF-8"); |
| 124 | is.skip(pos); |
| 125 | is.read(current_block); |
| 126 | is.close(); |
| 127 | |
| 128 | } catch (IOException e) { |
| 129 | try { f.close(); |
| 130 | return; |
| 131 | } catch (IOException ex2) {/*No messages*/} |
| 132 | } catch (Exception e) { return; } |
| 133 | |
| 134 | try { |
| 135 | f.close(); |
| 136 | } catch (Exception e) {/*No messages*/} |
| 137 | |
| 138 | current_index = pos; |
| 139 | } |
| 140 | |
| 141 | private String getSubstr(int off, int length) { |
| 142 | return new String(current_block).substring(off, off + length); |
no test coverage detected