* Returns true if the iteration has more records, false otherwise.\r
*/\r
public boolean hasNext() {\r
- int available;\r
try {\r
- available = input.available();\r
try {\r
leaderBuffer = new byte[24];\r
input.readFully(leaderBuffer);\r
} catch (EOFException eof) {\r
// If we are not capable of reading the leader before EOF, we cannot read a record\r
- // This happens when we read gzipped marc files, that it returns available bytes, but none is present\r
- available = 0;\r
+ return false;\r
}\r
- if (available == 0)\r
- return false;\r
} catch (IOException e) {\r
throw new MarcException(e.getMessage(), e);\r
}\r