private void setWriterInternal(Writer writer, boolean setByUser) { m_writer_set_by_user = setByUser; m_writer = writer; // if we are tracing events we need to trace what // characters are written to the output writer. if (m_tracer != null) { boolean noTracerYet = true; Writer w2 = m_writer; while (w2 instanceof WriterChain) { if (w2 instanceof SerializerTraceWriter) { noTracerYet = false; break; } w2 = ((WriterChain)w2).getWriter(); } if (noTracerYet) m_writer = new SerializerTraceWriter(m_writer, m_tracer); } }
flushBuffer(); setBufferSize(2 * lengthx3); flushBuffer();
/** * Flush the internal buffer and close the Writer * @see java.io.Writer#close() */ public void close() throws java.io.IOException { // send to the real writer if (m_writer != null) m_writer.close(); // from here on just for tracing purposes flushBuffer(); }
/** * Constructor. * If the writer passed in is null, then this SerializerTraceWriter will * only signal trace events of what would have been written to that writer. * If the writer passed in is not null then the trace events will mirror * what is going to that writer. In this way tools, such as a debugger, can * gather information on what is being written out. * * @param out the Writer to write to (possibly null) * @param tracer the tracer to inform that characters are being written */ public SerializerTraceWriter(Writer out, SerializerTrace tracer) { m_writer = out; m_tracer = tracer; setBufferSize(1024); }
/** * Flush the internal buffer and flush the Writer * @see java.io.Writer#flush() */ public void flush() throws java.io.IOException { // send to the real writer if (m_writer != null) m_writer.flush(); // from here on just for tracing purposes flushBuffer(); }
/** * Constructor. * If the writer passed in is null, then this SerializerTraceWriter will * only signal trace events of what would have been written to that writer. * If the writer passed in is not null then the trace events will mirror * what is going to that writer. In this way tools, such as a debugger, can * gather information on what is being written out. * * @param out the Writer to write to (possibly null) * @param tracer the tracer to inform that characters are being written */ public SerializerTraceWriter(Writer out, SerializerTrace tracer) { m_writer = out; m_tracer = tracer; setBufferSize(1024); }
flushBuffer(); setBufferSize(2 * lengthx3); flushBuffer();
/** * @see SerializationHandler#setTransformer(Transformer) */ public void setTransformer(Transformer transformer) { super.setTransformer(transformer); if (m_tracer != null && !(m_writer instanceof SerializerTraceWriter) ) setWriterInternal(new SerializerTraceWriter(m_writer, m_tracer), false); } /**
/** * Constructor. * If the writer passed in is null, then this SerializerTraceWriter will * only signal trace events of what would have been written to that writer. * If the writer passed in is not null then the trace events will mirror * what is going to that writer. In this way tools, such as a debugger, can * gather information on what is being written out. * * @param out the Writer to write to (possibly null) * @param tracer the tracer to inform that characters are being written */ public SerializerTraceWriter(Writer out, SerializerTrace tracer) { m_writer = out; m_tracer = tracer; setBufferSize(1024); }
flushBuffer(); setBufferSize(2 * lengthx3); flushBuffer();
/** * Flush the internal buffer and flush the Writer * @see java.io.Writer#flush() */ public void flush() throws java.io.IOException { // send to the real writer if (m_writer != null) m_writer.flush(); // from here on just for tracing purposes flushBuffer(); }
private void setWriterInternal(Writer writer, boolean setByUser) { m_writer_set_by_user = setByUser; m_writer = writer; // if we are tracing events we need to trace what // characters are written to the output writer. if (m_tracer != null) { boolean noTracerYet = true; Writer w2 = m_writer; while (w2 instanceof WriterChain) { if (w2 instanceof SerializerTraceWriter) { noTracerYet = false; break; } w2 = ((WriterChain)w2).getWriter(); } if (noTracerYet) m_writer = new SerializerTraceWriter(m_writer, m_tracer); } }
/** * Constructor. * If the writer passed in is null, then this SerializerTraceWriter will * only signal trace events of what would have been written to that writer. * If the writer passed in is not null then the trace events will mirror * what is going to that writer. In this way tools, such as a debugger, can * gather information on what is being written out. * * @param out the Writer to write to (possibly null) * @param tracer the tracer to inform that characters are being written */ public SerializerTraceWriter(Writer out, SerializerTrace tracer) { m_writer = out; m_tracer = tracer; setBufferSize(1024); }
flushBuffer(); setBufferSize(2 * lengthx3); flushBuffer();
/** * Flush the internal buffer and close the Writer * @see java.io.Writer#close() */ public void close() throws java.io.IOException { // send to the real writer if (m_writer != null) m_writer.close(); // from here on just for tracing purposes flushBuffer(); }
private void setWriterInternal(Writer writer, boolean setByUser) { m_writer_set_by_user = setByUser; m_writer = writer; // if we are tracing events we need to trace what // characters are written to the output writer. if (m_tracer != null) { boolean noTracerYet = true; Writer w2 = m_writer; while (w2 instanceof WriterChain) { if (w2 instanceof SerializerTraceWriter) { noTracerYet = false; break; } w2 = ((WriterChain)w2).getWriter(); } if (noTracerYet) m_writer = new SerializerTraceWriter(m_writer, m_tracer); } }
/** * Constructor. * If the writer passed in is null, then this SerializerTraceWriter will * only signal trace events of what would have been written to that writer. * If the writer passed in is not null then the trace events will mirror * what is going to that writer. In this way tools, such as a debugger, can * gather information on what is being written out. * * @param out the Writer to write to (possibly null) * @param tracer the tracer to inform that characters are being written */ public SerializerTraceWriter(Writer out, SerializerTrace tracer) { m_writer = out; m_tracer = tracer; setBufferSize(1024); }
flushBuffer(); setBufferSize(2 * lengthx3); flushBuffer();
/** * Flush the internal buffer and close the Writer * @see java.io.Writer#close() */ public void close() throws java.io.IOException { // send to the real writer if (m_writer != null) m_writer.close(); // from here on just for tracing purposes flushBuffer(); }