/** * Read an {@code int} from a line containing its decimal representation. * * @return the value of the {@code int} from the next line. * @throws IOException for underlying {@code InputStream} errors or conversion error. * @throws EOFException for the end of source stream. */ public int readInt() throws IOException { String intString = readLine(); try { return Integer.parseInt(intString); } catch (NumberFormatException e) { throw new IOException("expected an int but was \"" + intString + "\""); } }
/** * Read an {@code int} from a line containing its decimal representation. * * @return the value of the {@code int} from the next line. * @throws IOException for underlying {@code InputStream} errors or conversion error. * @throws EOFException for the end of source stream. */ public int readInt() throws IOException { String intString = readLine(); try { return Integer.parseInt(intString); } catch (NumberFormatException e) { throw new IOException("expected an int but was \"" + intString + "\""); } }
/** * Read an {@code int} from a line containing its decimal representation. * * @return the value of the {@code int} from the next line. * @throws IOException for underlying {@code InputStream} errors or conversion error. * @throws EOFException for the end of source stream. */ public int readInt() throws IOException { String intString = readLine(); try { return Integer.parseInt(intString); } catch (NumberFormatException e) { throw new IOException("expected an int but was \"" + intString + "\""); } }
/** * Read an {@code int} from a line containing its decimal representation. * * @return the value of the {@code int} from the next line. * @throws IOException for underlying {@code InputStream} errors or conversion error. * @throws EOFException for the end of source stream. */ public int readInt() throws IOException { String intString = readLine(); try { return Integer.parseInt(intString); } catch (NumberFormatException e) { throw new IOException("expected an int but was \"" + intString + "\""); } }
/** * Read an {@code int} from a line containing its decimal representation. * * @return the value of the {@code int} from the next line. * @throws IOException for underlying {@code InputStream} errors or conversion error. * @throws EOFException for the end of source stream. */ public int readInt() throws IOException { String intString = readLine(); try { return Integer.parseInt(intString); } catch (NumberFormatException e) { throw new IOException("expected an int but was \"" + intString + "\""); } }
/** * Read an {@code int} from a line containing its decimal representation. * * @return the value of the {@code int} from the next line. * @throws IOException for underlying {@code InputStream} errors or conversion error. * @throws EOFException for the end of source stream. */ public int readInt() throws IOException { String intString = readLine(); try { return Integer.parseInt(intString); } catch (NumberFormatException e) { throw new IOException("expected an int but was \"" + intString + "\""); } }
/** * Read an {@code int} from a line containing its decimal representation. * * @return the value of the {@code int} from the next line. * @throws IOException for underlying {@code InputStream} errors or conversion error. * @throws EOFException for the end of source stream. */ public int readInt() throws IOException { String intString = readLine(); try { return Integer.parseInt(intString); } catch (NumberFormatException e) { throw new IOException("expected an int but was \"" + intString + "\""); } }