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; } }
@Override public void close() throws IOException { if (!isClosed()) { _emitter.emit(new DocumentEndEvent(null, null, false)); _emitter.emit(new StreamEndEvent(null, null)); super.close(); /* 25-Nov-2008, tatus: As per [JACKSON-16] we are not to call close() * on the underlying Reader, unless we "own" it, or auto-closing * feature is enabled. * One downside: when using UTF8Writer, underlying buffer(s) * may not be properly recycled if we don't close the writer. */ if (_writer != null) { if (_ioContext.isResourceManaged() || isEnabled(JsonGenerator.Feature.AUTO_CLOSE_TARGET)) { _writer.close(); } else if (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM)) { // If we can't close it, we should at least flush _writer.flush(); } } } }
@Override public void close() throws IOException { if (!isClosed()) { _emitter.emit(new DocumentEndEvent(null, null, false)); _emitter.emit(new StreamEndEvent(null, null)); super.close(); /* 25-Nov-2008, tatus: As per [JACKSON-16] we are not to call close() * on the underlying Reader, unless we "own" it, or auto-closing * feature is enabled. * One downside: when using UTF8Writer, underlying buffer(s) * may not be properly recycled if we don't close the writer. */ if (_writer != null) { if (_ioContext.isResourceManaged() || isEnabled(JsonGenerator.Feature.AUTO_CLOSE_TARGET)) { _writer.close(); } else if (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM)) { // If we can't close it, we should at least flush _writer.flush(); } } } }
public SldTransformContext endStream() throws IOException { yaml.emit(new StreamEndEvent(null, null)); output.flush(); return this; }
event = new StreamEndEvent(token.getStartMark(), token.getEndMark()); if (!states.isEmpty()) { throw new YAMLException("Unexpected end of stream. States left: " + states);
public SldTransformContext endStream() throws IOException { yaml.emit(new StreamEndEvent(null, null)); output.flush(); return this; }
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; } }
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; } }
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; } }
@JRubyMethod public IRubyObject end_stream(ThreadContext context) { StreamEndEvent event = new StreamEndEvent(NULL_MARK, NULL_MARK); emit(context, event); return this; }
@JRubyMethod public IRubyObject end_stream(ThreadContext context) { StreamEndEvent event = new StreamEndEvent(NULL_MARK, NULL_MARK); emit(context, event); return this; }
@Override public void close() throws IOException { if (!isClosed()) { _emitter.emit(new DocumentEndEvent(null, null, false)); _emitter.emit(new StreamEndEvent(null, null)); super.close(); _writer.close(); } }
@Override public void close() throws IOException { if (!isClosed()) { _emitter.emit(new DocumentEndEvent(null, null, false)); _emitter.emit(new StreamEndEvent(null, null)); super.close(); /* 25-Nov-2008, tatus: As per [JACKSON-16] we are not to call close() * on the underlying Reader, unless we "own" it, or auto-closing * feature is enabled. * One downside: when using UTF8Writer, underlying buffer(s) * may not be properly recycled if we don't close the writer. */ if (_writer != null) { if (_ioContext.isResourceManaged() || isEnabled(StreamWriteFeature.AUTO_CLOSE_TARGET)) { _writer.close(); } else if (isEnabled(StreamWriteFeature.FLUSH_PASSED_TO_STREAM)) { // If we can't close it, we should at least flush _writer.flush(); } } } }
event = new StreamEndEvent(token.getStartMark(), token.getEndMark()); if (!states.isEmpty()) { throw new YAMLException("Unexpected end of stream. States left: " + states);
event = new StreamEndEvent(token.getStartMark(), token.getEndMark()); if (!states.isEmpty()) { throw new YAMLException("Unexpected end of stream. States left: " + states);
event = new StreamEndEvent(token.getStartMark(), token.getEndMark()); if (!states.isEmpty()) { throw new YAMLException("Unexpected end of stream. States left: " + states);