当前位置: 代码迷 >> J2SE >> 哪些种中有nextLine()方法
  详细解决方案

哪些种中有nextLine()方法

热度:286   发布时间:2016-04-24 18:09:42.0
哪些类中有nextLine()方法
如题,小弟现在只知道BufferdeReader和Scanner中有nextline(),哪位大大帮忙整理一下,都有哪些类中有nextLine()方法。

------解决方案--------------------
BufferdeReader有nextLine()方法????我怎么没用过呢?
------解决方案--------------------
本人愚昧还请指教bufferedreader中只有readline方法吧
./com/sun/corba/se/impl/io/IIOPInputStream.java: public final String readLine() throws IOException{
./java/io/BufferedReader.java: public String readLine() throws IOException {
./java/io/Console.java: public String readLine(String fmt, Object ... args) {
./java/io/Console.java: public String readLine() {
./java/io/DataInputStream.java: public final String readLine() throws IOException {
./java/io/LineNumberReader.java: public String readLine() throws IOException
./java/io/ObjectInputStream.java: public String readLine() throws IOException {
./java/io/ObjectInputStream.java: public String readLine() throws IOException {
./java/io/RandomAccessFile.java: public final String readLine() throws IOException {
./java/util/jar/Manifest.java: public int readLine(byte[] b, int off, int len)throws IOException {
./java/util/jar/Manifest.java: public int readLine(byte[] b) throws IOException {
./java/util/Scanner.java: public String nextLine() {
./javax/imageio/stream/ImageInputStreamImpl.java: public String readLine() throws IOException {
------解决方案--------------------
楼主记错了吧,刚刚查了API
BufferdeReader没有nextLine()方法,有readLine()方法
官方API:只有Scanner有nextLine()方法
下面的类都有readLine()方法
readLine occurences: 
java.io.BufferedReader.readLine() 
java.io.Console.readLine() 
java.io.Console.readLine(java.lang.String, java.lang.Object...) 
java.io.DataInput.readLine() 
java.io.DataInputStream.readLine() 
java.io.LineNumberReader.readLine() 
java.io.ObjectInputStream.readLine() 
java.io.RandomAccessFile.readLine() 
javax.imageio.stream.ImageInputStream.readLine() 
javax.imageio.stream.ImageInputStreamImpl.readLine()