Fills the deprecated OutputFormat interface for streaming.
333844
@Deprecated
    public CqlRecordWriter getRecordWriter(org.apache.hadoop.fs.FileSystem filesystem, org.apache.hadoop.mapred.JobConf job, String name, org.apache.hadoop.util.Progressable progress) throws IOException
    {
        return new CqlRecordWriter(job, progress);
    }
2247
@Override
    public void encode(OutputStream output, Indenter indenter) {
        encode(output, indenter, null);
    }
1319800
void flush(OutputStream out, String encoding)
         throws IOException
    {
        flush(new OutputStreamWriter(out,encoding));
    }
81202
public void reconstituteSourceStreams(DestinationHandler dest, PtoPOutputHandler outputHandler, int startMode) 
  
  throws MessageStoreException, SIDiscriminatorSyntaxException, SIErrorException, SIResourceException
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "reconstituteSourceStreams", new Integer(startMode));

    
    /*
     * Iterate through all contained Protocol Items, looking for StreamSet
     * associated with source. Note that outputHandler passed in is null if this 
     * is Pubsub. 
     */ 
     
    SourceStreamSetFilter filter = null;
    if( dest.isPubSub())
    { 
      filter = new SourceStreamSetFilter(null);
    }
    else
    {
      filter = new SourceStreamSetFilter(outputHandler.getTargetMEUuid());
    }
    
    NonLockingCursor cursor = null;
    
    try
    {
      cursor = newNonLockingItemCursor(filter);    
           
	    AbstractItem item = null;
	    
	    //should only be one match!!
	    while (null != (item = cursor.next()))
	    {
	      StreamSet streamSet = (StreamSet)item;
          streamSet.initializeNonPersistent(dest.getTxManager());
	      
	      // Don't do flush if we are asked to start in recovery mode 
	      if(   ((startMode & JsConstants.ME_START_FLUSH ) == JsConstants.ME_START_FLUSH )
	         && ((startMode & JsConstants.ME_START_RECOVERY ) == 0 ) )
	      {
	        // Log message to console saying we have started flush for this steamSet
	        // parmeters are:- ME name, streamSet Uuid, destinationName
	        SibTr.info(
	          tc,
	          "FLUSH_INITIATED_MESSAGE_CWSIP0781",
	          new Object[] { dest.getMessageProcessor().getMessagingEngineName(),
	                        streamSet.getStreamID(),
	                        dest.getName() });
	      }
	      try
	      {
	        if( dest.isPubSub())
	        {
	          PubSubInputHandler inputHandler = (PubSubInputHandler)dest.getInputHandler();
	          inputHandler.reconstitutePubSubSourceStreams(streamSet, startMode);
	        }
	        else
	        {        
	          outputHandler.reconstitutePtoPSourceStreams(streamSet, startMode);
	        }
	      }
	      catch (SIResourceException e)
	      {
	        // FFDC
	        FFDCFilter.processException(
	          e,
	          "com.ibm.ws.sib.processor.impl.store.itemstreams.SourceProtocolItemStream.reconstituteSourceStreams",
	          "1:179:1.29",
	          this);
	        
	        // Don't do flush if we are asked to start in recovery mode 
	        if(   ((startMode & JsConstants.ME_START_FLUSH ) == JsConstants.ME_START_FLUSH )
	           && ((startMode & JsConstants.ME_START_RECOVERY ) == 0 ) )
	        {
	          // Log message to console saying flush for this steamSet has failed
	          // parmeters are:- ME name, streamSet Uuid, destinationName, exception.
	          SibTr.error(
	            tc,
	            "FLUSH_FAILED_MESSAGE_CWSIP0782",
	            new Object[] {dest.getMessageProcessor().getMessagingEngineName(),
	                          streamSet.getStreamID(),
	                          dest.getName(),
	                          e });
	        }
	        
	        // Rethrow exception after logging error
	        if (tc.isEntryEnabled()) SibTr.exit(tc, "reconstituteSourceStreams");
	        throw(e);
	      
	      }
	    }
    }
    finally
    {
      if (cursor != null)
        cursor.finished();
    }
    
    if (tc.isEntryEnabled())  
      SibTr.exit(tc, "reconstituteSourceStreams");      
  }
829684
public function flushOutput()
    {
        switch ($this->_sOutputFormat) {
            case self::OUTPUT_FORMAT_JSON:
                echo getStr()->jsonEncode($this->_aBuffer);
                break;
            case self::OUTPUT_FORMAT_HTML:
            default:
                break;
        }
    }
140384
private void fillTrailerBuffer() throws IOException {
    trailerBuffer = new byte[trailerSize];

    if (trailerSize == 0) {
      return;
    }

    int bytesRead = StreamUtils.readAllBytes(in, trailerBuffer);
    if (bytesRead != trailerBuffer.length) {
      throw new EOFException(String.format(
          "Trailer size was %d bytes but stream only contained %d bytes.",
          trailerSize, bytesRead));
    }
  }
312976
def default_stream_factory(
    total_content_length, filename, content_type, content_length=None
):
    """"""
    max_size = 1024 * 500
    if SpooledTemporaryFile is not None:
        return SpooledTemporaryFile(max_size=max_size, mode="wb+")
    if total_content_length is None or total_content_length > max_size:
        return TemporaryFile("wb+")
    return BytesIO()
1085423
public void printUsage(OutputStream out, boolean showHidden) {
        printUsage(new PrintWriter(new OutputStreamWriter(out, UTF_8)), showHidden);
    }
310718
public void serialize(final OutputStream out) throws IOException {
    final Writer writer = new BufferedWriter(new OutputStreamWriter(out));

    for (final List<String> entry : this.predContexts) {
      writer.write(
          entry.get(0) + "\t" + entry.get(1) + "\t" + entry.get(2) + "\n");
    }
    writer.flush();
  }
1065161
function processOutputs(outputs) {
  var removeSourceMaps = require('./sourcemaps').removeSourceMaps;

  var offset = 0;

  var outputObj = {};

  var sources = outputObj.sources = [];
  var sourceMapsWithOffsets = outputObj.sourceMapsWithOffsets = [];

  outputs.forEach(function(output) {
    var source;
    if (typeof output == 'object') {
      source = output.source || '';
      var offset_ = output.sourceMapOffset || 0;
      var map = output.sourceMap;
      if (map) {
        sourceMapsWithOffsets.push([offset + offset_, map]);
      }
    }
    // NB perhaps we should enforce output is always an object down the chain?
    else if (typeof output == 'string') {
      source = output;
    }
    else {
      var format = output ? output.toString() : typeof output;
      throw new Error("Unexpected output format: " + format);
    }
    source = removeSourceMaps(source || '');
    offset += countLines(source);
    sources.push(source);
  });

  return outputObj;
}
145359
private void fill() throws IOException {
        byte[] buffer = getBufIfOpen();
        if (markpos < 0)
            pos = 0;            /* no mark: throw away the buffer */
        else if (pos >= buffer.length)  /* no room left in buffer */
            if (markpos > 0) {  /* can throw away early part of the buffer */
                int sz = pos - markpos;
                System.arraycopy(buffer, markpos, buffer, 0, sz);
                pos = sz;
                markpos = 0;
            } else if (buffer.length >= marklimit) {
                markpos = -1;   /* buffer got too big, invalidate mark */
                pos = 0;        /* drop buffer contents */
            } else if (buffer.length >= MAX_BUFFER_SIZE) {
                throw new OutOfMemoryError("Required array size too large");
            } else {            /* grow buffer */
                int nsz = (pos <= MAX_BUFFER_SIZE - pos) ?
                        pos * 2 : MAX_BUFFER_SIZE;
                if (nsz > marklimit)
                    nsz = marklimit;
                byte nbuf[] = new byte[nsz];
                System.arraycopy(buffer, 0, nbuf, 0, pos);
                if (!compareAndSetBuf(buffer, nbuf)) {
                    // Can't replace buf if there was an async close.
                    // Note: This would need to be changed if fill()
                    // is ever made accessible to multiple threads.
                    // But for now, the only way CAS can fail is via close.
                    // assert buf == null;
                    throw new IOException("Stream closed");
                }
                buffer = nbuf;
            }
        count = pos;
        int n = getInIfOpen().read(buffer, pos, buffer.length - pos);
        if (n > 0)
            count = n + pos;
    }
1212507
public void encode(OutputStream out) throws IOException {
       DerOutputStream  tmp = new DerOutputStream();
        encode(out, PKIXExtensions.CRLNumber_Id, true);
    }
651417
private function fillBuffer() {

	    // wrap bufferInstance in closure to allow the use of $this in template

	    $closure = function($outer) {

            ob_start();

            /* @deprecated use $this when accessing assigned variables */

            $tpl = $this;

            eval('?>' . $this->__rawContents);
            $outer->contents = ob_get_contents();
            ob_end_clean();

        };

	    $boundClosure = $closure->bindTo($this->bufferInstance);
	    $boundClosure($this);

	}
1258447
public static void streamOut(OutputStream out, Object object) throws IOException {
        streamOut(out, object, false);
    }
598101
void addOutput() {
        if( output != null ) {
            outputs.addLast( output );
        }
        output = state.pool.get();
    }
96144
def _tostream(parser, obj, stream, skipprepack = False):
    
    if hasattr(parser, 'tostream'):
        return parser.tostream(obj, stream, skipprepack)
    else:
        data = parser.tobytes(obj, skipprepack)
        cls = type(parser)
        if cls not in _deprecated_parsers:
            _deprecated_parsers.add(cls)
            warnings.warn("Parser %r does not have 'tostream' interfaces" % (cls,), UserWarning)
        return stream.write(data)
748192
public static void dump(DataSource dataSource, PrintStream out) {
    try (Log log = Log.create(out)) {
      log.write(CallInfo.create(), executeQuery(dataSource));
    }
  }