Package org.yaml.snakeyaml.events

Examples of org.yaml.snakeyaml.events.StreamEndEvent


        return this;
    }

    @JRubyMethod
    public IRubyObject end_stream(ThreadContext context) {
        StreamEndEvent event = new StreamEndEvent(NULL_MARK, NULL_MARK);
        emit(context, event);
        return this;
    }
View Full Code Here


        return this;
    }

    @JRubyMethod
    public IRubyObject end_stream(ThreadContext context) {
        StreamEndEvent event = new StreamEndEvent(NULL_MARK, NULL_MARK);
        emit(context, event);
        return this;
    }
View Full Code Here

            } else {
                throw new CanonicalException("document is expected, got " + scanner.tokens.get(0));
            }
        }
        scanner.getToken(Token.ID.StreamEnd);
        events.add(new StreamEndEvent(null, null));
    }
View Full Code Here

            } else if (className.equals("MappingEndEvent")) {
                value = new MappingEndEvent(null, null);
            } else if (className.equals("SequenceEndEvent")) {
                value = new SequenceEndEvent(null, null);
            } else if (className.equals("StreamEndEvent")) {
                value = new StreamEndEvent(null, null);
            } else if (className.equals("StreamStartEvent")) {
                value = new StreamStartEvent(null, null);
            } else {
                throw new UnsupportedOperationException();
            }
View Full Code Here

                dummyMark, dummyMark, (char) 0));
        etalonEvents.add(new ScalarEvent(null, null, new ImplicitTuple(true, false), "abcd",
                dummyMark, dummyMark, (char) 0));
        etalonEvents.add(new MappingEndEvent(dummyMark, dummyMark));
        etalonEvents.add(new DocumentEndEvent(dummyMark, dummyMark, false));
        etalonEvents.add(new StreamEndEvent(dummyMark, dummyMark));
        while (parser.checkEvent(null)) {
            Event event = parser.getEvent();
            if (etalonEvents.isEmpty()) {
                fail("unexpected event: " + event);
            }
View Full Code Here

        etalonEvents.add(new ScalarEvent(null, null, new ImplicitTuple(true, false),
                "Boston Red Sox", dummyMark, dummyMark, (char) 0));
        etalonEvents.add(new SequenceEndEvent(dummyMark, dummyMark));
        etalonEvents.add(new MappingEndEvent(dummyMark, dummyMark));
        etalonEvents.add(new DocumentEndEvent(dummyMark, dummyMark, false));
        etalonEvents.add(new StreamEndEvent(dummyMark, dummyMark));
        while (parser.checkEvent(null)) {
            Event event = parser.getEvent();
            if (etalonEvents.isEmpty()) {
                fail("unexpected event: " + event);
            }
View Full Code Here

        return this;
    }

    @JRubyMethod
    public IRubyObject end_stream(ThreadContext context) {
        StreamEndEvent event = new StreamEndEvent(NULL_MARK, NULL_MARK);
        emit(context, event);
        return this;
    }
View Full Code Here

    public void close() throws IOException {
        if (closed == null) {
            throw new SerializerException("serializer is not opened");
        } else if (!Boolean.TRUE.equals(closed)) {
            this.emitter.emit(new StreamEndEvent(null, null));
            this.closed = Boolean.TRUE;
        }
    }
View Full Code Here

                states.push(new ParseDocumentEnd());
                state = new ParseDocumentContent();
            } else {
                // Parse the end of the stream.
                StreamEndToken token = (StreamEndToken) scanner.getToken();
                event = new StreamEndEvent(token.getStartMark(), token.getEndMark());
                if (!states.isEmpty()) {
                    throw new YAMLException("Unexpected end of stream. States left: " + states);
                }
                if (!marks.isEmpty()) {
                    throw new YAMLException("Unexpected end of stream. Marks left: " + marks);
View Full Code Here

TOP

Related Classes of org.yaml.snakeyaml.events.StreamEndEvent

Copyright © 2018 www.massapicom. 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.