code: public static ConnectionType getConnectionType(byte type) {
          switch (type) {
              case TYPE_OUTBOUND:
                  return OUTBOUND;
              case TYPE_OUTBOUND_CR_TO_REMOTE:
                  return OUTBOUND_CR_TO_REMOTE;
              case TYPE_OUTBOUND_SR_TO_CR_REMOTE:
                  return OUTBOUND_SR_TO_CR_REMOTE;
  
              case TYPE_INBOUND:
                  return INBOUND;
              case TYPE_INBOUND_CR:
                  return INBOUND_CR;
  
              case TYPE_INTERNAL_CR_SR:
                  return INTERNAL_CR_SR;
          }
  
          return null;
      }
docs: Set the connection type on the virtual connection.
  
  @param type
  ConnectionType for the VirtualConnection
  @return ConnectionType