Package java.io

Examples of java.io.InputStream.reset()


                    for (; count < 4; ++count) {
                        b4[count] = stream.read();
                        if (b4[count] == -1)
                            break;
                    }
                    stream.reset();

                    if (count == 4) {
                        // UCS-2, big endian
                        if (b4[0] == 0x00 && b4[1] == 0x3C && b4[2] == 0x00 && b4[3] == 0x3F) {
                            isBigEndian = Boolean.TRUE;
View Full Code Here


      }
       InputStream is = getResetableInputStream();
       if (is!=null) {
        //reseatable can read again bytes.
         if (bytes==null) {
            is.reset();      
            bytes=JavaUtils.getBytesFromStream(is);
         }      
         return bytes;              
      }                   
         Canonicalizer20010315OmitComments c14nizer =
View Full Code Here

            if (bytes!=null) {
                //already read write it, can be rea.
              diOs.write(bytes,0,bytes.length);
                return;
            }           
            is.reset();           
            int num;
            byte[] bytesT = new byte[1024];
            while ((num=is.read(bytesT))>0) {
              diOs.write(bytesT,0,num);
            }
View Full Code Here

        final byte[] hdr = new byte[64];
        in.mark(20);
        IO.readFully(in, hdr, 0, 2);

        if (isStandardFormat(hdr)) {
          in.reset();
          in = buffer(inflate(in, size, id));
          while (0 < in.read())
            continue;
        } else {
          readSome(in, hdr, 2, 18);
View Full Code Here

          int c = hdr[0] & 0xff;
          int p = 1;
          while ((c & 0x80) != 0)
            c = hdr[p++] & 0xff;

          in.reset();
          IO.skipFully(in, p);
          in = buffer(inflate(in, size, id));
        }

        ok = true;
View Full Code Here

               // could mean that an unusable stream will be passed to the
               // interceptor
               InputStream stream = clientResponse.getStreamFactory().getInputStream();
               if (stream != null)
               {
                  stream.reset();
               }
            }
            catch (IOException e1)
            {
               // eat this exception since it's not really relevant for the client response
View Full Code Here

            // could mean that an unusable stream will be passed to the
            // interceptor
            InputStream stream = clientResponse.getStreamFactory().getInputStream();
            if (stream != null)
            {
               stream.reset();
            }
         }
         catch (IOException e1)
         {
            // eat this exception since it's not really relevant for the client response
View Full Code Here

        final byte[] hdr = new byte[64];
        in.mark(20);
        IO.readFully(in, hdr, 0, 2);

        if (isStandardFormat(hdr)) {
          in.reset();
          in = buffer(inflate(in, size, id));
          while (0 < in.read())
            continue;
        } else {
          readSome(in, hdr, 2, 18);
View Full Code Here

          int c = hdr[0] & 0xff;
          int p = 1;
          while ((c & 0x80) != 0)
            c = hdr[p++] & 0xff;

          in.reset();
          IO.skipFully(in, p);
          in = buffer(inflate(in, size, id));
        }

        ok = true;
View Full Code Here

                        return new InstallResult(true, b, 0);
                    }
                }
            }
            try {
                is.reset();
            } catch (IOException e) {
                is.close();
                is = new BufferedInputStream(new URL(bundleLocation).openStream());
            }
            LOGGER.debug("Installing bundle " + bundleLocation);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.