Examples of available()


Examples of org.htmlparser.lexer.Stream.available()

            begin = System.currentTimeMillis ();
            do
            {
                index++;
                if (0 == index % 1000)
                    available2 += stream.available ();
            }
            while (-1 != stream.read ());
            time2 = System.currentTimeMillis () - begin;

//            System.out.println ("fills: " + stream.fills);
View Full Code Here

Examples of org.iq80.leveldb.util.SliceInput.available()

            // if there are more bytes in the record then there are available in the block,
            // fragment the record; otherwise write to the end of the record
            boolean end;
            int fragmentLength;
            if (sliceInput.available() > bytesAvailableInBlock) {
                end = false;
                fragmentLength = bytesAvailableInBlock;
            }
            else {
                end = true;
View Full Code Here

Examples of org.jacorb.orb.CDRInputStream.available()

            readAddressProfile(in);

            int length = in.read_ulong();

            if (in.available() < length)
            {
                throw new MARSHAL("Unable to extract object key. Only " + in.available() + " available and trying to assign " + length);
            }

            objectKey = new byte[length];
View Full Code Here

Examples of org.jboss.invocation.MarshalledValueInputStream.available()

         boolean moveToBuddy =
            subtree.isChildOf(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN) && subtree.size() > 1;
  
         // store new state
         Fqn fqn = null;
         while(in.available() > 0)
         {
            nd=(NodeData)in.readObject();
           
            if (moveToBuddy)
               fqn = BuddyManager.getBackupFqn(subtree, nd.fqn);
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBufferInputStream.available()

                do
                {
                    line.set( stream.readLine() );
                    block.yield( context, JavaEmbedUtils.javaToRuby( getRuntime(), line.get() ) );
                }
                while( line.get() != null && stream.available() > 0 );
            }
            catch( IOException e )
            {
                throw getRuntime().newIOError( e.getLocalizedMessage() );
            }
View Full Code Here

Examples of org.jboss.remoting.transport.multiplex.utility.GrowablePipedInputStream.available()

         int size = 64 * 1024;
        
         for (int i = 0; i < size; i++)
            gpos.write(i);
        
         assertTrue(gpis.available() == size);
        
      }
      catch (Exception e)
      {
         log.error(e);
View Full Code Here

Examples of org.jboss.seam.deployment.HotDeploymentStrategy.available()

        Collection<Component> seamComponents = findSeamComponents();

        // Also scan for hot deployed components
        HotDeploymentStrategy hotDeployment = HotDeploymentStrategy.instance();
        if (hotDeployment != null && hotDeployment.available()) {
            log.info("scanning for hot deployable JAX-RS components");
            AnnotationDeploymentHandler hotDeploymentHandler =
                    (AnnotationDeploymentHandler) hotDeployment
                            .getDeploymentHandlers().get(
                                    AnnotationDeploymentHandler.NAME);
View Full Code Here

Examples of org.jets3t.service.io.SegmentedRepeatableFileInputStream.available()

        while (offset < targetOffset && (read = segFIS.read()) != -1) {
            offset++;
        }
        assertEquals("Couldn't read up to target offset", targetOffset, offset);
        assertEquals("Unexpected amount of data available",
            testFileLength - targetOffset, segFIS.available());
        segFIS.mark(0);
        while ((read = segFIS.read()) != -1) {
            assertEquals("Read unexpected byte at offset " + offset,
                (offset % 256), read);
            offset++;
View Full Code Here

Examples of org.jgroups.util.BlockingInputStream.available()

   
    public void testCreation() throws IOException {
        BlockingInputStream in=new BlockingInputStream(2000);
        System.out.println("in = " + in);
        assert in.available() == 0 && in.capacity() == 2000;

        in.write(new byte[]{'b', 'e', 'l', 'a'});
        System.out.println("in = " + in);
        assert in.available() == 4 && in.capacity() == 2000;
    }
View Full Code Here

Examples of org.jruby.embed.io.ReaderInputStream.available()

    @Test
    public void testAvailable() throws Exception {
        logger1.info("available");
        ReaderInputStream instance = new ReaderInputStream(new FileReader(filename));
        int expResult = 40;
        int result = instance.available();
        assertEquals(expResult, result);
        instance.close();
    }

    /**
 
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.