code: @Override
      public long write(long numBytes, int time) throws IOException {
          int timeout = time;
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "write(" + numBytes + "," + timeout + ")");
          }
          getTCPConnLink().incrementNumWrites();
          if (getConfig().getDumpStatsInterval() > 0) {
              getTCPConnLink().getTCPChannel().totalSyncWrites.incrementAndGet();
          }
          // always check external call parms
          checkForErrors(numBytes, false, timeout);
          if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
              Socket socket = getTCPConnLink().getSocketIOChannel().getSocket();
              Tr.event(tc, "write (sync) requested for local: " + socket.getLocalSocketAddress() + " remote: " + socket.getRemoteSocketAddress());
          }
  
          long numUserBytesWritten = 0L; // no. of user bytes written
  
          if (isAborted()) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                  Tr.event(tc, "Previously aborted, unable to perform write");
              }
              throw new IOException("Connection aborted by program");
          }
  
          if (timeout == IMMED_TIMEOUT) {
              immediateTimeout();
          } else if (timeout == ABORT_TIMEOUT) {
              abort();
              immediateTimeout();
          } else {
              // if using channel timeout, reset to that value
              if (timeout == TCPRequestContext.USE_CHANNEL_TIMEOUT) {
                  timeout = getConfig().getInactivityTimeout();
              }
              // check if this is a FileChannel write request
              if (isFileChannelWriteToBeDone()) {
                  numUserBytesWritten = fileChannelWrite(numBytes, timeout);
              } else {
                  numUserBytesWritten = processSyncWriteRequest(numBytes, timeout);
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "write(sync): " + numUserBytesWritten);
          }
          return (numUserBytesWritten);
      }
docs: /*
  @see com.ibm.wsspi.tcpchannel.TCPWriteRequestContext#write(long, int)