Because this method don't throws IOException. The exception is only cited in javadocs, but method don't have declared this exception. So Javadoc isn't consistent.