Examples of reset()


Examples of javax.sound.sampled.AudioInputStream.reset()

        ais.mark(1000);
        assertEquals(8, ais.read(new byte[10]));
        assertEquals(24, ais.available());
        assertEquals(0, ais.skip(2));
        assertEquals(8, ais.skip(10));
        ais.reset();
        assertEquals(32, ais.available());
        assertEquals(0, ais.read(new byte[10], -1, 2));
        assertEquals(8, ais.read(new byte[10], 0, 11));
        try {
            ais.read();
View Full Code Here

Examples of javax.swing.text.html.HTMLDocumentTestCase.DocumentController.reset()

        final DocumentController controller = new DocumentController();
        htmlDoc.addDocumentListener(controller);

        htmlDoc.processHTMLFrameHyperlinkEvent(event1);
        assertFalse(controller.isChanged());
        controller.reset();

        assertSame(frame2, event2.getSourceElement());
        htmlDoc.processHTMLFrameHyperlinkEvent(event2);
        assertNull(htmlDoc.getParser());
        assertTrue(controller.isChanged());
View Full Code Here

Examples of javax.util.jcache.Attributes.reset()

    public void resetAttributes(Attributes attributes) {
        if (!isValid()) {
            return;
        }
        Attributes att = region.getAttributes();
        att.reset();
        att.applyAttributes(attributes);
    }

    /**
     * See {@link #resetAttributes(Attributes)}.
View Full Code Here

Examples of javax.xml.bind.util.ValidationEventCollector.reset()

                System.setProperty("jaxb.debug", "true");
                unmarshaller.setListener(new DebugListener());
                */
                Unmarshaller unmarshaller = contextHelper.getUnmarshaller(jaxbContext);
                try {
                    validationEventCollector.reset();
                    unmarshaller.setEventHandler(validationEventCollector);
                    result = unmarshaller.unmarshal(source, JAXBContextHelper.getJavaType(context.getTargetDataType()));
                } finally {
                    contextHelper.releaseJAXBUnmarshaller(jaxbContext, unmarshaller);
                }
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilder.reset()

            if (proxiedBuilder.getPoolVersion() != poolVersion) {
                return;
            }
           
            DocumentBuilder unwrappedBuilder = proxiedBuilder.getProxiedBuilder();
            unwrappedBuilder.reset();
            SoftReference<DocumentBuilder> builderReference = new SoftReference<DocumentBuilder>(unwrappedBuilder);

            if (builderPool.size() < maxPoolSize) {
                proxiedBuilder.setReturned(true);
                builderPool.push(builderReference);
View Full Code Here

Examples of javax.xml.parsers.SAXParser.reset()

                // Create a SAXParser
                SAXParser sp = spf.newSAXParser();
               
                // Parse, reset the parser and then parse again.
                sp.parse(docURI, parserAPIUsage);
                sp.reset();
                sp.parse(docURI, parserAPIUsage);
            }
        }
        catch (SAXParseException e) {
            // ignore
View Full Code Here

Examples of javax.xml.transform.Transformer.reset()

        }
        finally
        {
            try
            {
                transformer.reset();
                transformers.put(transformer);
            }
            catch (final InterruptedException e)
            {
                throw new ActionProcessingException(e.getMessage(), e);
View Full Code Here

Examples of javax.xml.validation.Validator.reset()

        Validator validator = schema.newValidator();
        Object beforeReset = validator.getProperty(SECURITY_MANAGER);
        validator.setProperty(SECURITY_MANAGER, null);
        Object changed = validator.getProperty(SECURITY_MANAGER);
        assertFalse("Property value should have changed after calling setProperty().", beforeReset != changed);
        validator.reset();
        Object afterReset = validator.getProperty(SECURITY_MANAGER);
        assertTrue("Property value should be the same after calling reset()", beforeReset == afterReset);
    }
   
    public void testFeatureReset() throws Exception {
View Full Code Here

Examples of javax.xml.xpath.XPath.reset()

   
    XPath xpath = XPathFactory.newInstance().newXPath();
    String emMOR = xpath.evaluate("//eventManager/text()", new InputSource(new StringReader(contentXml)));
    System.out.println("view:" + emMOR);
    String lastEventXml = rc.get("moid=" + emMOR + "&doPath=latestEvent");
    xpath.reset();
    String eMessage = xpath.evaluate("//fullFormattedMessage/text()", new InputSource(new StringReader(lastEventXml)));
    System.out.println("Latest Event: " + eMessage);

    System.out.println(rc.get(null));
    System.out.println(rc.get("?moid=ServiceInstance&doPath=content%2eabout"));
View Full Code Here

Examples of javazoom.jl.decoder.OutputBuffer.reset()

            decoder.decodeFrame(header, bitstream);
          } catch (Exception ignored) {
            // JLayer's decoder throws ArrayIndexOutOfBoundsException sometimes!?
          }
          bitstream.closeFrame();
          output.write(outputBuffer.getBuffer(), 0, outputBuffer.reset());
        }
        bitstream.close();
        setup(output.toByteArray(), channels, sampleRate);
      } catch (Throwable ex) {
        throw new GdxRuntimeException("Error reading audio data.", ex);
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.