docs: @Override
      public void readExternal(ObjectInput s) throws IOException, ClassNotFoundException {
          String type = (String) s.readObject();
          String endian = (String) s.readObject();
  
          // read in serialized data
          byte[] bytes = (byte[]) s.readObject();
  
          if (type.equals("ND")) {
              // wrap the bytes into a non-direct buffer. We don't want to
              // get the ByteBuffer from the pool since we would have to copy the
              // bytes from this byte array into the new ByteBuffer.
              // wrap will use a non-direct ByteBuffer
              this.oByteBuffer = ByteBuffer.wrap(bytes);
              if (endian.equals("B")) {
                  this.oByteBuffer.order(java.nio.ByteOrder.BIG_ENDIAN);
              } else {
                  this.oByteBuffer.order(java.nio.ByteOrder.LITTLE_ENDIAN);
              }
          } else {
              // allocate a Direct Buffer. Do not allocate from a pool since
              // determining the code responsible for releasing the buffer is
              // not clear.
              this.oByteBuffer = ByteBuffer.allocateDirect(bytes.length);
  
              // Set endian before reading from the buffer
              if (endian.equals("B")) {
                  this.oByteBuffer.order(java.nio.ByteOrder.BIG_ENDIAN);
              } else {
                  this.oByteBuffer.order(java.nio.ByteOrder.LITTLE_ENDIAN);
              }
              this.oByteBuffer.put(bytes);
          }
  
          this.oByteBuffer.position(Integer.parseInt((String) s.readObject()));
          this.oByteBuffer.limit(Integer.parseInt((String) s.readObject()));
  
          String rOnly = (String) s.readObject();
          if (rOnly.equals("R")) {
              this.readOnly = true;
          } else {
              this.readOnly = false;
          }
  
          // 262860 New buffer will need the Pool Manager for duplicates/slices
          this.oWsByteBufferPoolManager = (WsByteBufferPoolManagerImpl) WsByteBufferPoolManagerImpl.getRef();
          this.trusted = this.oWsByteBufferPoolManager.isTrustedUsers();
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "readExternal:  trusted set to: " + this.trusted);
          }
          // If we can serialize, then this was/is true.
          this.removedFromLeakDetection = true;
      }