Examples of reset()


Examples of org.apache.http.nio.impl.reactor.SessionInputBuffer.reset()

        byte[] tmp = outstream.toByteArray();
       
        ReadableByteChannel channel = newChannel(tmp);       
        SessionInputBuffer inbuf = new SessionInputBuffer(16, 16);
        inbuf.reset(params);
       
        while (inbuf.fill(channel) > 0) {
        }
       
        for (int i = 0; i < 10; i++) {
View Full Code Here

Examples of org.apache.http.nio.impl.reactor.SessionOutputBuffer.reset()

       
        HttpParams params = new DefaultHttpParams(null);
        HttpProtocolParams.setHttpElementCharset(params, "UTF-8");
       
        SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 16);
        outbuf.reset(params);
       
        for (int i = 0; i < 10; i++) {
            outbuf.writeLine(s1);
            outbuf.writeLine(s2);
            outbuf.writeLine(s3);
View Full Code Here

Examples of org.apache.http.nio.util.SimpleInputBuffer.reset()

        assertEquals(-1, buffer.read());
        assertEquals(-1, buffer.read(b2));
        assertEquals(-1, buffer.read(b2, 0, b2.length));
        assertTrue(buffer.isEndOfStream());
       
        buffer.reset();
        assertFalse(buffer.isEndOfStream());
    }

    public void testOutputBufferOperations() throws IOException {
        ByteArrayOutputStream outstream = new ByteArrayOutputStream();
View Full Code Here

Examples of org.apache.jackrabbit.core.data.AsyncUploadCache.reset()

     */
    public void testStoreRetrieve() {
        try {
            AsyncUploadCache pendingFiles = new AsyncUploadCache();
            pendingFiles.init(TARGET_DIR, CACHE_DIR, 100);
            pendingFiles.reset();
            LocalCache cache = new LocalCache(CACHE_DIR, TEMP_DIR, 400, 0.95,
                0.70, pendingFiles);
            Random random = new Random(12345);
            byte[] data = new byte[100];
            Map<String, byte[]> byteMap = new HashMap<String, byte[]>();
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.NetworkErrorProxy.reset()

        try {
            if (skipBytes > 0 || flipPosition >= 0) {
                assertFalse("stores are not expected to be equal", storeS.getHead().equals(storeC.getHead()));
                assertEquals(storeC2.getHead(), storeC.getHead());

                p.reset();
                if (intermediateChange) {
                    addTestContent(store, "server2");
                    storeS.flush();
                }
                cl.run();
View Full Code Here

Examples of org.apache.james.mime4j.stream.BodyDescriptorBuilder.reset()

        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder();
        builder.addField(new RawField("Content-Type ", "text/PLAIN"));
        BodyDescriptor bd = builder.build();
        assertEquals("text/plain", bd.getMimeType());

        builder.reset();
        builder.addField(new RawField("content-type", "   TeXt / html   "));
        bd = builder.build();
        assertEquals("text/html", bd.getMimeType());

        builder.reset();
View Full Code Here

Examples of org.apache.jena.atlas.lib.AlarmClock.reset()

    {
        AlarmClock alarmClock = new AlarmClock() ;
        assertEquals(0, alarmClock.getCount()) ;
        Pingback<?> ping1 = alarmClock.add(callback, 100) ;
        assertEquals(1, alarmClock.getCount()) ;
        alarmClock.reset(ping1, 2000) ;
        assertEquals(1, alarmClock.getCount()) ;
        sleep(100) ;
        assertEquals(1, alarmClock.getCount()) ;
    }
   
View Full Code Here

Examples of org.apache.jetspeed.om.common.portlet.MutablePortletEntity.reset()

        pref.setValueAt(0, "2");

        assertEquals("2", pref.getValueAt(0));

        entity.reset();

        pref = (PreferenceComposite) prefs.get("pref1");

        assertEquals("1", pref.getValueAt(0));
View Full Code Here

Examples of org.apache.jetspeed.om.folder.psml.FolderImpl.reset()

        if (folderImpl.getFolderMetaData() != null)
        {
            folderImpl.getFolderMetaData().setParent(null);
        }
        folderImpl.setParent(null);
        folderImpl.reset();
    }

    private static final boolean deleteFile(File file)
    {
        if (file.isDirectory())
View Full Code Here

Examples of org.apache.jk.common.MsgAjp.reset()

            if( thisTime > chunkSize ) {
                thisTime=chunkSize;
            }
            len-=thisTime;
           
            msg.reset();
            msg.appendByte( HandlerRequest.JK_AJP13_SEND_BODY_CHUNK);
            if( log.isDebugEnabled() ) log.debug("doWrite " + off + " " + thisTime + " " + len );
            msg.appendBytes( chunk.getBytes(), chunk.getOffset() + off, thisTime );
            off+=thisTime;
            ep.setType( JkHandler.HANDLE_SEND_PACKET );
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.