Package java.util.jar

Examples of java.util.jar.JarInputStream.available()


    JarInputStream jis = new JarInputStream(url.openStream());
    Set result = new LinkedHashSet(8);

    // parse the jar and do pattern matching
    try {
      while (jis.available() > 0) {
        JarEntry jarEntry = jis.getNextJarEntry();
        // if the jar has ended, the entry can be null (on Sun JDK at least)
        if (jarEntry != null) {
          String entryPath = jarEntry.getName();
View Full Code Here


   protected InputStream getSegmentInputStream(InputStream baseIn, String segment) throws IOException
   {
      JarInputStream jarIn = new JarInputStream(baseIn);
      JarEntry entry = null;

      while (jarIn.available() != 0)
      {
         entry = jarIn.getNextJarEntry();

         if (entry == null)
         {
View Full Code Here

            byte buffer[] = new byte[maxToRead];
            bytes = new byte[maxToRead * 2];

            // Keep reading until we run out of bytes for this entry
            // We will resize our return value byte array if we run out of space
            while (jarIn.available() == 1) {
                int readSize = jarIn.read(buffer, 0, buffer.length);
                if (readSize > 0) {
                    totalRead += readSize;
                    if (totalRead > bytes.length) {
                        byte temp[] = new byte[bytes.length * 2];
 
View Full Code Here

                        {
                            byte[] buffer = new byte[2048];

                            int read = 0;

                            while ( in.available() > 0 )
                            {
                                read = in.read( buffer,
                                                0,
                                                buffer.length );
View Full Code Here

        throws IOException
    {
        JarInputStream jarIn = new JarInputStream( baseIn );
        JarEntry entry = null;

        while ( jarIn.available() != 0 )
        {
            entry = jarIn.getNextJarEntry();

            if ( entry == null )
            {
View Full Code Here

                        {
                            byte[] buffer = new byte[ 2048 ];
                           
                            int read = 0;
                           
                            while ( in.available() > 0 )
                            {
                                read = in.read( buffer,
                                                0,
                                                buffer.length );
                               
View Full Code Here

        throws IOException
    {
        JarInputStream jarIn = new JarInputStream( baseIn );
        JarEntry entry = null;

        while ( jarIn.available() != 0 )
        {
            entry = jarIn.getNextJarEntry();

            if ( entry == null )
            {
View Full Code Here

        Map<String, byte[]> classData = new TreeMap<String, byte[]>();
        while (entry != null) {
          String name = entry.getName();
          if (name.endsWith(".class")) {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            while (jis.available() > 0) {
              bos.write(jis.read());
            }
            classData.put(DominoUtils.filePathToJavaBinaryName(name, "/"), bos.toByteArray());
          }
View Full Code Here

      Map<String, byte[]> classData = new HashMap<String, byte[]>();
      while (entry != null) {
        String name = entry.getName();
        if (name.endsWith(".class")) {
          ByteArrayOutputStream bos = new ByteArrayOutputStream();
          while (jis.available() > 0) {
            bos.write(jis.read());
          }
          classData.put(DominoUtils.filePathToJavaBinaryName(name, "/"), bos.toByteArray());
        }
View Full Code Here

           
            try
            {
                JarEntry entry = null;
               
                while ( in.available() != 0 )
                {
                    entry = in.getNextJarEntry();
                   
                    if ( entry.getName().equals( classPath ) )
                    {
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.