Examples of reset()


Examples of java.nio.CharBuffer.reset()

    assertEquals(buf.order(), readonly.order());
    assertEquals(buf.capacity(), readonly.capacity());
    assertContentEquals(buf, readonly);

    // readonly's position, mark, and limit should be independent to buf
    readonly.reset();
    assertEquals(readonly.position(), 0);
    readonly.clear();
    assertEquals(buf.position(), buf.limit());
    buf.reset();
    assertEquals(buf.position(), 0);
View Full Code Here

Examples of java.nio.DoubleBuffer.reset()

        assertEquals(buf.isDirect(), readonly.isDirect());
        assertEquals(buf.order(), readonly.order());
        assertContentEquals(buf, readonly);

        // readonly's position, mark, and limit should be independent to buf
        readonly.reset();
        assertEquals(readonly.position(), 0);
        readonly.clear();
        assertEquals(buf.position(), buf.limit());
        buf.reset();
        assertEquals(buf.position(), 0);
View Full Code Here

Examples of java.nio.FloatBuffer.reset()

        assertEquals(buf.isDirect(), readonly.isDirect());
        assertEquals(buf.order(), readonly.order());
        assertContentEquals(buf, readonly);

        // readonly's position, mark, and limit should be independent to buf
        readonly.reset();
        assertEquals(readonly.position(), 0);
        readonly.clear();
        assertEquals(buf.position(), buf.limit());
        buf.reset();
        assertEquals(buf.position(), 0);
View Full Code Here

Examples of java.nio.IntBuffer.reset()

            sumIntegralImage.mark();
            sumSQIntegralImage.mark();

            startTimer();
            for (int i = 0; i < iterations; i++) {
                sumIntegralImage.reset();
                sumSQIntegralImage.reset();
                test(image, sumIntegralImage, sumSQIntegralImage);
            }

            return getTime();
View Full Code Here

Examples of java.nio.LongBuffer.reset()

            sumSQIntegralImage.mark();

            startTimer();
            for (int i = 0; i < iterations; i++) {
                sumIntegralImage.reset();
                sumSQIntegralImage.reset();
                test(image, sumIntegralImage, sumSQIntegralImage);
            }

            return getTime();
        }
View Full Code Here

Examples of java.nio.ShortBuffer.reset()

        assertEquals(buf.isDirect(), readonly.isDirect());
        assertEquals(buf.order(), readonly.order());
        assertContentEquals(buf, readonly);

        // readonly's position, mark, and limit should be independent to buf
        readonly.reset();
        assertEquals(readonly.position(), 0);
        readonly.clear();
        assertEquals(buf.position(), buf.limit());
        buf.reset();
        assertEquals(buf.position(), 0);
View Full Code Here

Examples of java.nio.channels.SocketChannel.reset()

                        }
                    } else {
                        socket = (NioChannel)channel;
                        SocketProcessor sc = processorCache.poll();
                        if ( sc == null ) sc = new SocketProcessor(socket,status);
                        else sc.reset(socket,status);
                        sc.run();
                    }
                }catch(CancelledKeyException cx) {
                    if (socket!=null && key!=null) socket.getPoller().cancelledKey(key,null,false);
                } catch (OutOfMemoryError oom) {
View Full Code Here

Examples of java.nio.charset.CharsetDecoder.reset()

    if (c != '%')
        break;
      }
      bb.flip();
      cb.clear();
      dec.reset();
      CoderResult cr = dec.decode(bb, cb, true);
      assert cr.isUnderflow();
      cr = dec.flush(cb);
      assert cr.isUnderflow();
      sb.append(cb.flip().toString());
View Full Code Here

Examples of java.nio.charset.CharsetEncoder.reset()

        }

        Map<Charset, CharsetEncoder> map = encoders.get();
        CharsetEncoder e = map.get(charset);
        if (e != null) {
            e.reset();
            e.onMalformedInput(CodingErrorAction.REPLACE);
            e.onUnmappableCharacter(CodingErrorAction.REPLACE);
            return e;
        }
View Full Code Here

Examples of java.nio.file.WatchKey.reset()

            }
          });

        }

        final boolean valid = key.reset();
        if (!valid) {
          break;
        }
      }
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.