用户:洞穴夜莺/EInputStream:修订间差异

无编辑摘要
无编辑摘要
无编辑摘要
第19行: 第19行:


     @Override
     @Override
     public int read(){
     public int read() {
         return 'e';
         return 'e';
     }
     }


     @Override
     @Override
     public int read(byte[] b) throws IOException {
     public int read(byte[] b) {
         for(int i = 0; i < b.length; i++)
         for(int i = 0; i < b.length; i++)
             b[i] = (byte)'e';
             b[i] = (byte)'e';
第31行: 第31行:


     @Override
     @Override
     public byte[] readAllBytes() throws IOException {
     public byte[] readAllBytes() {
         throw new OutOfMemoryError("Endless");
         throw new OutOfMemoryError("Endless");
     }
     }


     @Override
     @Override
     public int read(byte[] b, int off, int len) throws IOException {
     public int read(byte[] b, int off, int len) {
         for(int i = off; i < len + off; i++)
         for(int i = off; i < len + off; i++)
             b[i] = (byte)'e';
             b[i] = (byte)'e';
第43行: 第43行:


     @Override
     @Override
     public byte[] readNBytes(int len) throws IOException {
     public byte[] readNBytes(int len) {
         byte[] rval = new byte[len];
         byte[] rval = new byte[len];
         read(rval);
         read(rval);
第50行: 第50行:


     @Override
     @Override
     public int readNBytes(byte[] b, int off, int len) throws IOException {
     public int readNBytes(byte[] b, int off, int len) {
         return read(b, off, len);
         return read(b, off, len);
     }
     }


     @Override
     @Override
     public long skip(long n) throws IOException {
     public long skip(long n) {
         return n;
         return n;
     }
     }
833

个编辑