larksuite-oapi/src/main/java/com/larksuite/oapi/okio1_17/Segment.java
public final void writeTo(Segment sink, int byteCount) {
    if (!sink.owner) throw new IllegalArgumentException();
    if (sink.limit + byteCount > SIZE) {
      // We can't fit byteCount bytes at the sink's current position. Shift sink first.
      if (sink.shared) throw new IllegalArgumentException();
      if (sink.limit + byteCount - sink.pos > SIZE) throw new IllegalArgumentException();
      System.arraycopy(sink.data, sink.pos, sink.data, 0, sink.limit - sink.pos);
      sink.limit -= sink.pos;
      sink.pos = 0;
    }

    System.arraycopy(data, pos, sink.data, sink.limit, byteCount);
    sink.limit += byteCount;
    pos += byteCount;
  }
/** Moves {@code byteCount} bytes from this segment to {@code sink}. */
Moves  byteCount bytes from this segment to  sink.
Moves byteCount bytes from this segment to sink .
public final void writeTo(Segment sink, int byteCount) {
    if (!sink.owner) throw new IllegalArgumentException();
    if (sink.limit + byteCount > SIZE) {
      if (sink.shared) throw new IllegalArgumentException();
      if (sink.limit + byteCount - sink.pos > SIZE) throw new IllegalArgumentException();
      System.arraycopy(sink.data, sink.pos, sink.data, 0, sink.limit - sink.pos);
      sink.limit -= sink.pos;
      sink.pos = 0;
    }
    System.arraycopy(data, pos, sink.data, sink.limit, byteCount);
    sink.limit += byteCount;
    pos += byteCount;
  }
public final void writeTo ( Segment sink , int byteCount ) { if ( ! sink . owner ) throw new IllegalArgumentException ( ) ; if ( sink . limit + byteCount > SIZE ) { if ( sink . shared ) throw new IllegalArgumentException ( ) ; if ( sink . limit + byteCount - sink . pos > SIZE ) throw new IllegalArgumentException ( ) ; System . arraycopy ( sink . data , sink . pos , sink . data , 0 , sink . limit - sink . pos ) ; sink . limit -= sink . pos ; sink . pos = 0 ; } System . arraycopy ( data , pos , sink . data , sink . limit , byteCount ) ; sink . limit += byteCount ; pos += byteCount ; }
Moves {@code byteCount} bytes from this segment to {@code sink}.
Moves { @code byteCount } bytes from this segment to { @code sink } .
// We can't fit byteCount bytes at the sink's current position. Shift sink first.