Examples of skip()


Examples of org.apache.pig.builtin.PigStorage.skip()

            BufferedPositionedInputStream bpis =
                new BufferedPositionedInputStream( is );
            storage.bindTo(testFile.getName(), bpis, 0, testFile.length());
           
            // Skip till middle of a line
            storage.skip( (text.length() + 1 )
                    * (LOOP_COUNT/2) + text.length()/2 );
           
            // Test if we have skipped till end of the line
            assertEquals( "Invalid Bytes Skiped", storage.getPosition(),
                (text.length()+1) * ((LOOP_COUNT/2) +1 ) );          
View Full Code Here

Examples of org.apache.tools.ant.filters.StringInputStream.skip()

    public void writeTo(OutputStream out, long start, long count)
        throws IOException
    {
        InputStream in = new StringInputStream(extensionJs);
        try {
            in.skip(start);
            if (count<0)
                IO.copy(in, out);
            else
                IO.copy(in, out, (int)count);
        }
View Full Code Here

Examples of org.apache.xindice.util.ByteArrayInput.skip()

               childNodes.add(new NotationImpl(this, data, pos, len));
               break;
         }

         bis.setPos(pos);
         bis.skip(len);
      }
   }

   /**
    *  This is a convenience method to allow easy determination of whether a
View Full Code Here

Examples of org.apache.xindice.xml.XMLCompressedInput.skip()

         in.readContentSize();
         in.readShort();             // Element Symbol
         int attrCount = in.readAttributeCount();
         for ( int i = 0 ; i < attrCount; i++ ) {
            in.readShort();          // Attribute Symbol
            in.skip(in.readShort()); // Attribute Length
         }
      }
      else {
         in.readInt();
      }
View Full Code Here

Examples of org.archive.io.ArchiveRecord.skip()

                validRecords += 1;
                int contentOffset = header.getContentBegin();
                long totalLength = header.getLength();
                int contentLength = (int) totalLength - contentOffset;

                archiveRecord.skip(contentOffset);
                byte[] content = new byte[contentLength];
                archiveRecord.read(content);

                String mimetype = header.getMimetype();
                // The Arc headers != HTTP headers, but it's at least some data we can jam
View Full Code Here

Examples of org.auraframework.util.LimitedLengthInputStream.skip()

        createTestStream(5);
        in = new LimitedLengthInputStream(wrappedStream, limit, listener);
        try {
            assertFalse(callbackCalled);
            assertEquals(5, in.available());
            assertEquals(5, in.skip(5));
            assertFalse(callbackCalled);
            assertEquals(0, in.available());
            assertEquals(0, in.skip(1));
            assertFalse(callbackCalled); // The contract of skip() doesn't let
                                         // us definitively say that we're at
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNodeIterator.skip()

                // if there was no node with such uuid in target workspace
                return session.getNodeByIdentifier(uuid);
            } else {
                // otherwise get the latest child with such name
                JcrNodeIterator iterator = parentNode.getNodes(name);
                iterator.skip(iterator.getSize() - 1);
                JcrNode newNode = iterator.nextNode();
                String newUuid = newNode.getIdentifier();

                // and if it has uuid other than the existing one (should always
                // be the case)
View Full Code Here

Examples of org.drools.repository.AssetItemIterator.skip()

                                                 int numRows) {
        List<TableDataRow> result = new ArrayList<TableDataRow>();
        RepositoryFilter filter = new AssetItemFilter();

        AssetItemIterator it = getRulesRepository().findArchivedAssets();
        it.skip( skip );
        int count = 0;
        while ( it.hasNext() ) {

            AssetItem archived = (AssetItem) it.next();
View Full Code Here

Examples of org.ektorp.ViewQuery.skip()

        if (maxRows > 0) {
            query = query.limit(maxRows);
        }
        if (firstRow > 1) {
            final int skip = firstRow - 1;
            query = query.skip(skip);
        }

        final StreamingViewResult streamingView = connector.queryForStreamingView(query);

        final SelectItem[] selectItems = MetaModelHelper.createSelectItems(columns);
View Full Code Here

Examples of org.elasticsearch.common.io.stream.BytesStreamOutput.skip()

        int position = 0;
        assertEquals(position, out.position());

        int forward = 100;
        out.skip(forward);
        assertEquals(position + forward, out.position());

        out.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.