src/org/nutz/lang/stream/QueueInputStream.java
public String readLine() throws IOException{
        StringBuilder sb = new StringBuilder();
        for(;;){
            int v = peek();
            if(v == '\r' || v == '\n'){
                poll();
                v = peekNext();
                if(v == '\r' || v == '\n'){
                    poll();
                }
                break;
            }
            sb.append((char)poll());
        }
        return sb.toString();
    }
public String readLine() throws IOException{
        StringBuilder sb = new StringBuilder();
        for(;;){
            int v = peek();
            if(v == '\r' || v == '\n'){
                poll();
                v = peekNext();
                if(v == '\r' || v == '\n'){
                    poll();
                }
                break;
            }
            sb.append((char)poll());
        }
        return sb.toString();
    }
public String readLine ( ) throws IOException { StringBuilder sb = new StringBuilder ( ) ; for ( ; ; ) { int v = peek ( ) ; if ( v == ' ' || v == ' ' ) { poll ( ) ; v = peekNext ( ) ; if ( v == ' ' || v == ' ' ) { poll ( ) ; } break ; } sb . append ( ( char ) poll ( ) ) ; } return sb . toString ( ) ; }
读取一行
@return 一行数据
@throws IOException
读取一行