public void open() throws IOException { if (closed == null) { this.emitter.emit(new StreamStartEvent(null, null)); this.closed = Boolean.FALSE; } else if (Boolean.TRUE.equals(closed)) { throw new SerializerException("serializer is closed"); } else { throw new SerializerException("serializer is already opened"); } }
public Event produce() { // Parse the stream start. StreamStartToken token = (StreamStartToken) scanner.getToken(); Event event = new StreamStartEvent(token.getStartMark(), token.getEndMark()); // Prepare the next state. state = new ParseImplicitDocumentStart(); return event; } }
public YAMLGenerator(IOContext ctxt, int jsonFeatures, int yamlFeatures, ObjectCodec codec, Writer out, org.yaml.snakeyaml.DumperOptions.Version version) throws IOException { super(jsonFeatures, codec); _ioContext = ctxt; _formatFeatures = yamlFeatures; _writer = out; _outputOptions = buildDumperOptions(jsonFeatures, yamlFeatures, version); _emitter = new Emitter(_writer, _outputOptions); // should we start output now, or try to defer? _emitter.emit(new StreamStartEvent(null, null)); Map<String,String> noTags = Collections.emptyMap(); boolean startMarker = Feature.WRITE_DOC_START_MARKER.enabledIn(yamlFeatures); _emitter.emit(new DocumentStartEvent(null, null, startMarker, version, // for 1.10 was: ((version == null) ? null : version.getArray()), noTags)); }
public YAMLGenerator(IOContext ctxt, int jsonFeatures, int yamlFeatures, ObjectCodec codec, Writer out, org.yaml.snakeyaml.DumperOptions.Version version) throws IOException { super(jsonFeatures, codec); _ioContext = ctxt; _formatFeatures = yamlFeatures; _writer = out; _outputOptions = buildDumperOptions(jsonFeatures, yamlFeatures, version); _emitter = new Emitter(_writer, _outputOptions); // should we start output now, or try to defer? _emitter.emit(new StreamStartEvent(null, null)); Map<String,String> noTags = Collections.emptyMap(); boolean startMarker = Feature.WRITE_DOC_START_MARKER.enabledIn(yamlFeatures); _emitter.emit(new DocumentStartEvent(null, null, startMarker, version, // for 1.10 was: ((version == null) ? null : version.getArray()), noTags)); }
public SldTransformContext stream() throws IOException { yaml.emit(new StreamStartEvent(null, null)); return this; }
public SldTransformContext stream() throws IOException { yaml.emit(new StreamStartEvent(null, null)); return this; }
public void open() throws IOException { if (closed == null) { this.emitter.emit(new StreamStartEvent(null, null)); this.closed = Boolean.FALSE; } else if (Boolean.TRUE.equals(closed)) { throw new SerializerException("serializer is closed"); } else { throw new SerializerException("serializer is already opened"); } }
public void open() throws IOException { if (closed == null) { this.emitter.emit(new StreamStartEvent(null, null)); this.closed = Boolean.FALSE; } else if (Boolean.TRUE.equals(closed)) { throw new SerializerException("serializer is closed"); } else { throw new SerializerException("serializer is already opened"); } }
public void open() throws IOException { if (closed == null) { this.emitter.emit(new StreamStartEvent(null, null)); this.closed = Boolean.FALSE; } else if (Boolean.TRUE.equals(closed)) { throw new SerializerException("serializer is closed"); } else { throw new SerializerException("serializer is already opened"); } }
public Event produce() { // Parse the stream start. StreamStartToken token = (StreamStartToken) scanner.getToken(); Event event = new StreamStartEvent(token.getStartMark(), token.getEndMark()); // Prepare the next state. state = new ParseImplicitDocumentStart(); return event; } }
public Event produce() { // Parse the stream start. StreamStartToken token = (StreamStartToken) scanner.getToken(); Event event = new StreamStartEvent(token.getStartMark(), token.getEndMark()); // Prepare the next state. state = new ParseImplicitDocumentStart(); return event; } }
public Event produce() { // Parse the stream start. StreamStartToken token = (StreamStartToken) scanner.getToken(); Event event = new StreamStartEvent(token.getStartMark(), token.getEndMark()); // Prepare the next state. state = new ParseImplicitDocumentStart(); return event; } }
@JRubyMethod public IRubyObject start_stream(ThreadContext context, IRubyObject encoding) { if (!(encoding instanceof RubyFixnum)) { throw context.runtime.newTypeError(encoding, context.runtime.getFixnum()); } initEmitter(context, encoding); StreamStartEvent event = new StreamStartEvent(NULL_MARK, NULL_MARK); emit(context, event); return this; }
@JRubyMethod public IRubyObject start_stream(ThreadContext context, IRubyObject encoding) { if (!(encoding instanceof RubyFixnum)) { throw context.runtime.newTypeError(encoding, context.runtime.getFixnum()); } initEmitter(context, encoding); StreamStartEvent event = new StreamStartEvent(NULL_MARK, NULL_MARK); emit(context, event); return this; }
public YAMLGenerator(ObjectWriteContext writeContext, IOContext ioCtxt, int streamWriteFeatures, int yamlFeatures, Writer out, org.yaml.snakeyaml.DumperOptions.Version version) throws IOException { super(writeContext, streamWriteFeatures); _ioContext = ioCtxt; _formatWriteFeatures = yamlFeatures; _writer = out; _outputOptions = buildDumperOptions(streamWriteFeatures, yamlFeatures, version); _emitter = new Emitter(_writer, _outputOptions); // should we start output now, or try to defer? _emitter.emit(new StreamStartEvent(null, null)); Map<String,String> noTags = Collections.emptyMap(); boolean startMarker = Feature.WRITE_DOC_START_MARKER.enabledIn(yamlFeatures); _emitter.emit(new DocumentStartEvent(null, null, startMarker, version, // for 1.10 was: ((version == null) ? null : version.getArray()), noTags)); }
public YAMLGenerator(IOContext ctxt, int jsonFeatures, int yamlFeatures, ObjectCodec codec, Writer out, org.yaml.snakeyaml.DumperOptions.Version version) throws IOException { super(jsonFeatures, codec); _ioContext = ctxt; _formatFeatures = yamlFeatures; _writer = out; _outputOptions = buildDumperOptions(jsonFeatures, yamlFeatures, version); _emitter = new Emitter(_writer, _outputOptions); // should we start output now, or try to defer? _emitter.emit(new StreamStartEvent(null, null)); Map<String,String> noTags = Collections.emptyMap(); boolean startMarker = Feature.WRITE_DOC_START_MARKER.enabledIn(yamlFeatures); _emitter.emit(new DocumentStartEvent(null, null, startMarker, version, // for 1.10 was: ((version == null) ? null : version.getArray()), noTags)); }