Write uncommited data to disk

@throws IOException
178606
private final void flushBuffer() throws IOException {
		if (bufOutput.position() > 0) {
			bufOutput.flip();
			fcOutput.write(bufOutput);
			bufOutput.clear();
			// log.debug("offsetOutputUncommited=" + offsetOutputUncommited + " offsetOutputCommited=" +
			// offsetOutputCommited + " fcOutput.position()=" + fcOutput.position());
			offsetOutputUncommited = offsetOutputCommited = fcOutput.position();
			if (syncOnFlush) {
				fcOutput.force(false);
				if (callback != null) {
					callback.synched(offsetOutputCommited);
				}
			}
		}
	}
647486
public synchronized static void write(int fd, byte[] ... data) throws IOException {
        for(byte[] single : data) {
            // write the data contents to the serial port via JNI native method
            write(fd, single, single.length);
        }
    }
981822
private void writeBuffer() throws IOException {
        bufferedWriter.flip(); // position is set to zero in dataFile.write
        dataFile.write(writeOffset, bufferedWriter);
        writeOffset += bufferedWriter.limit();
        bufferedWriter.clear();
        readNextChunkFromFile(); // before overwriting the next bucket. Read it.
    }
1086526
public void write(byte[] b, int off, int len) throws IOException {
	if (b != null) {
	    if (off + len > b.length) {
		len = b.length - off;
	    }
	    if (len <= 0) {
		return;
	    }
	    pos += blob.write(b, off, pos, len);
	}
    }
617759
public void write(byte data) throws IOException {
    fos.write(data);
    if(position + 1 > size)
      size = position+1;
    position+= 1;
  }
1245857
private void writeBufferToFile() throws IOException {
        if (_bufferOffset > 0) {
            List<ByteBuffer> payload = new ArrayList<ByteBuffer>(1);
            payload.add(ByteBuffer.wrap(_buffer, 0, _bufferOffset));
            NfsWriteResponse response = _nfsFile.write(_currentOffset, payload, _syncType);
            int bytesWritten = response.getCount();
            _currentOffset += bytesWritten;
            _bufferOffset -= bytesWritten;
            if (0 != _bufferOffset) { // Everything was not written.
                // _bufferOffset should be the number of unwritten bytes.
                // Copy the unwritten bytes to the beginning of the buffer.
                System.arraycopy(_buffer, bytesWritten, _buffer, 0, _bufferOffset);
            }
        }
    }
23238
public void dump() throws IOException {
    FileWriter out = new FileWriter(outFile, true);
    try {
      dump(out);
    } finally {
      out.close();
    }
  }
796853
public synchronized void write(byte[] b, int off, int len) throws IOException {
		dataOutputStream.write(b, off, len);
		dataOutputStream.flush();
	}
699417
public void flushBuffer() throws IOException {
        if (mCompressedSegments != 0) {
            throw new IOException("cannot flush a compressed buffer");
        }
        
        // marked the stream as having been previously flushed to avoid
        // attempting to compress the stream after the fact
        mFlushed = true;
        
        // write the internal buffer to the output stream and then clear any
        // data in the internal buffer to avoid duplicated data.
        ByteBuffer bytes = mBuffer;
        OutputStream out = super.getOutputStream();
        bytes.writeTo(out);
        bytes.clear();
        
        super.flushBuffer();
    }
267207
@Override
	public void write(DataOutput out) throws IOException {
		out.writeInt(this.partitionNumber);
		out.writeInt(this.totalNumberOfPartitions);
	}
322374
public void sendData() throws IOException {
        if (writer != null) {
            writer.write(buffer.toString());
            writer.flush();
            buffer = new StringBuilder();
        }
    }
1301846
private void flushBuffer() throws IOException {
    if (this.dirty_) {
      if (this.diskPos_ != this.lo_) {
        super.seek(this.lo_);
      }
      int len = (int) (this.curr_ - this.lo_);
      super.write(this.buff_, 0, len);
      this.diskPos_ = this.curr_;
      this.dirty_ = false;
    }
  }
1339289
public void write(byte b[], int off, int len)
        throws IOException
    {     
        len=prepareOutput(len);
        if (!_nulled)
            _out.write(b,off,len);
        if (_bytes==_contentLength)
            flush();
    }
186959
@Override
    public void write(byte[] b, int off, int len) throws IOException
    {
        int wbytes = len;
        int offset = off;
        
        while( wbytes > 0 )
        {
            if ( buf.position() >= buf.capacity() )
            {
                flush();
            }
            
            int length = Math.min( wbytes, buf.limit() - buf.position() );
            
            buf.put(b, offset, length);
            
            offset += length;
            wbytes -= length;
        }
    }
60144
def write(self, data):
        """"""
        for chunk in chunks(data, 512):
            self.wait_to_write()
            self.comport.write(chunk)
        self.comport.flush()
1086185
@Override
  public void write (final int b) throws IOException
  {
    if (m_nCount >= m_aBuf.length)
      _flushBuffer ();
    m_aBuf[m_nCount++] = (byte) b;
  }
1344001
private void writePendingToFile() throws java.io.IOException, InternalLogException, LogIncompatibleException
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "writePendingToFile");

        synchronized (_pendingWriteList)
        {
            LogRecord[] records = (LogRecord[]) _pendingWriteList.toArray(new LogRecord[0]);

            // Don't use vectored IO unless we're told to.
            if (!Boolean.getBoolean("com.ibm.ws.recoverylog.spi.UseVectoredIO"))
            {
                // Put the file header at the front of the list
                ByteBuffer header = (ByteBuffer) _fileBuffer.duplicate().position(0).limit(_logFileHeader.length());
                _fileChannel.write(header, 0);

                // Write the remainder of the list
                for (int i = 0; i < records.length; i++)
                {
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, "Performing write at position " + records[i].absolutePosition());
                    _fileChannel.write((ByteBuffer) records[i]._buffer.flip(), records[i].absolutePosition());
                }
            }
            else
            {
                // Sort the records into ascending order based on their absolute
                // position in the file.  We're going to try and keep the disk
                // moving forward.
                Arrays.sort(records, _recordComparator);

                // Now separate the records into two arrays:
                //   o ByteBuffers of data
                //   o Absolute File positions
                ByteBuffer[] buffers = new ByteBuffer[records.length + 1];
                int[] positions = new int[records.length + 1];

                for (int i = 0; i < records.length; i++)
                {
                    buffers[i + 1] = (ByteBuffer) records[i]._buffer.flip();
                    positions[i + 1] = records[i].absolutePosition();
                }

                // Put the file header at the front of the list
                buffers[0] = (ByteBuffer) _fileBuffer.duplicate().position(0).limit(_logFileHeader.length());
                positions[0] = 0;

                // Here's where we go through the list and attempt to write
                // batches of adjacent records using vectored I/O.
                int idx = 0;
                while (idx < buffers.length)
                {
                    int min = idx;
                    int max = idx;

                    // Somewhere in the middle
                    while (max <= (buffers.length - 2))
                    {
                        if (positions[max + 1] == (positions[max] + buffers[max].remaining()))
                            max++;
                    }

                    // Do the actual writes                    
                    _fileChannel.position(positions[min]);
                    _fileChannel.write(buffers, min, (max - min + 1));

                    // Go back and find the next batch
                    idx = max + 1;
                }
            }

            // Cleanup the pending write list for the next force
            _pendingWriteList.clear();
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "writePendingToFile");
    }