code: public void setDataChannelProtection(int protection)
          throws IOException, ServerException {
  
          String protectionStr = null;
          switch(protection) {
          case GridFTPSession.PROTECTION_CLEAR:
              protectionStr = "C"; break;
          case GridFTPSession.PROTECTION_SAFE:
              protectionStr = "S"; break;
          case GridFTPSession.PROTECTION_CONFIDENTIAL:
              protectionStr = "E"; break;
          case GridFTPSession.PROTECTION_PRIVATE:
              protectionStr = "P"; break;
          default: throw new IllegalArgumentException("Bad protection: " +
                                                      protection);
          }
  
          Command cmd = new Command("PROT", protectionStr);
          try {
              controlChannel.execute(cmd);
          } catch (UnexpectedReplyCodeException urce) {
              throw ServerException.embedUnexpectedReplyCodeException(urce);
          } catch(FTPReplyParseException rpe) {
              throw ServerException.embedFTPReplyParseException(rpe);
          }
  
          this.gSession.dataChannelProtection = protection;
  
          gLocalServer.setDataChannelProtection(protection);
      }
docs: Sets data channel protection level (PROT).
  
  @param protection should be
  {@link GridFTPSession#PROTECTION_CLEAR CLEAR},
  {@link GridFTPSession#PROTECTION_SAFE SAFE}, or
  {@link GridFTPSession#PROTECTION_PRIVATE PRIVATE}, or
  {@link GridFTPSession#PROTECTION_CONFIDENTIAL CONFIDENTIAL}.