Write data to socket in binary format.

@param pos socket output stream
@throws IOException if socket error occur
425692
public void writeBinary(final PacketOutputStream pos) throws IOException {
    if (length == Long.MAX_VALUE) {
      pos.write(reader, false, noBackslashEscapes);
    } else {
      pos.write(reader, length, false, noBackslashEscapes);
    }
  }
36514
public static void write(OutputStream dest, byte[] data, int ofs, int len) throws IOException {
        dest.write(data, ofs, len);
    }
472805
public void write(byte []buf, int offset, int length, boolean isEnd)
    throws IOException
  {
    OutputStream os = _os;
    
    if (os != null) {
      os.write(buf, offset, length);
    }
  }
656397
public void writeBinary(final PacketOutputStream pos) throws IOException {
    pos.write((byte) (fractionalSeconds ? 11 : 7));//length
    pos.writeShort((short) tz.getYear());
    pos.write((byte) ((tz.getMonth().getValue()) & 0xff));
    pos.write((byte) (tz.getDayOfMonth() & 0xff));
    pos.write((byte) tz.getHour());
    pos.write((byte) tz.getMinute());
    pos.write((byte) tz.getSecond());
    if (fractionalSeconds) {
      pos.writeInt(tz.getNano() / 1000);
    }
  }
106927
public void writeBytes(byte value, int len) throws IOException {
    if (len > buf.length - pos) {
      //not enough space remaining
      byte[] arr = new byte[len];
      Arrays.fill(arr, value);
      write(arr, 0, len);
      return;
    }

    for (int i = pos; i < pos + len; i++) {
      buf[i] = value;
    }
    pos += len;
  }
117421
public void writeTo(final PacketOutputStream pos) throws IOException {
    DateTimeFormatter formatter = DateTimeFormatter.ofPattern(
        fractionalSeconds ? "yyyy-MM-dd HH:mm:ss.SSSSSS" : "yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
    pos.write(QUOTE);
    pos.write(formatter.format(tz).getBytes());
    pos.write(QUOTE);
  }
1168642
public void seek(long pos) throws IOException
    {
        long inSegmentPos = pos - segmentOffset;
        if (inSegmentPos < 0 || inSegmentPos > buffer.capacity())
            throw new IOException(String.format("Seek position %d is not within mmap segment (seg offs: %d, length: %d)", pos, segmentOffset, buffer.capacity()));

        seekInternal((int) inSegmentPos);
    }
273298
public void writeBytes(byte[] buffer)
        throws IOException
    {
        if (buffer == null) {
            if (SIZE < _offset + 16)
                flushBuffer();

            _buffer[_offset++] = 'N';
        }
        else
            writeBytes(buffer, 0, buffer.length);
    }
715154
@Override
    public void write(DataWriter writer) throws IOException {
        writer.writeInt(pos);  /* array position */
        writer.writeInt(val);  /* data value */
        writer.writeLong(scn); /* SCN value */
    }
127162
public void writeBinary(PacketOutputStream pos) throws IOException {
    String value = bigDecimal.toPlainString();
    pos.writeFieldLength(value.length());
    pos.write(value);
  }
1143148
@Override
  public void seek(long pos) throws IOException {
    int n = (int) (real_pos - pos);
    if (n >= 0 && n <= buf_end) {
      buf_pos = buf_end - n;
    } else {
      super.seek(pos);
      invalidate();
    }
  }
828316
public void writeTo(OutputStream out)
        throws IOException
    {
        out.write(_buf,_start,_pos-_start);
    }
70732
static void overwrite(StringBuffer sb, int pos, String s) {
        int len = s.length();
        for (int i = 0; i < len; i++) {
            sb.setCharAt(pos + i, s.charAt(i));
        }
    }
356863
public void write(byte[] b) throws IOException
	{
		if (b == null)
			throw new NullPointerException();
		p.writeBytes(b, 0, b.length);
	}
676283
public void putString(int pos, CharSequence s) {
		for (int i = 0; i < s.length(); ++i) {
			char c = s.charAt(i);
			byte b0 = (byte)c;
			byte b1 = (byte)(c >> 8);
			if (_order == ByteOrder.BIG_ENDIAN) {
				putBytes(pos, b1, b0);
			} else {
				putBytes(pos, b0, b1);
			}
			pos += 2;
		}
	}
1153645
public final void writeTTFUShort(int pos, int val) throws IOException {
        if ((pos + 2) > fsize) {
            throw new java.io.EOFException("Reached EOF");
        }
        final byte b1 = (byte)((val >> 8) & 0xff);
        final byte b2 = (byte)(val & 0xff);
        file[pos] = b1;
        file[pos + 1] = b2;
    }
548514
public void write(BitOutputStream os) throws IOException {

        os.writeRawULong(sampleNumber, SEEKPOINT_SAMPLE_NUMBER_LEN);
        os.writeRawULong(streamOffset, SEEKPOINT_STREAM_OFFSET_LEN);
        os.writeRawUInt(frameSamples, SEEKPOINT_FRAME_SAMPLES_LEN);
    }