Package unibg.overencrypt.protocol

Examples of unibg.overencrypt.protocol.ServerPrimitives


   *
   * @param response the response to manage
   * @return the server primitives contained in the .response file
   */
  public static ServerPrimitives manageResponse(WebdavFileObject response){
    ServerPrimitives returnValue = null;
    InputStream is = null;
    try {
      is = response.getInputStream();
    } catch (FileSystemException e1) {
      LOGGER.error("While retrieve input stream from webdavfileobject - " + e1.getMessage());
    }
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line;
    try {
      line = br.readLine();
      boolean operationDone = false;
      while(line != null) {
        LOGGER.debug("Line read: " + line);
        for (int i = 0; i < ServerPrimitives.values().length; i++) {
          ServerPrimitives primitive = ServerPrimitives.values()[i];
          if(line.contains(primitive.toString())) {  //primitive found
            returnValue = primitive;
            operationDone = true;
            break;
          }       
        }
View Full Code Here


      if(response != null && response.exists()){
        //retrieve WebDAV resource
        LOGGER.debug("webdav path: " + path.replace("dav", "webdav") + "/.request");

        //process .response
        ServerPrimitives primitiveReceived = ResponseManager.manageResponse(response);
        LOGGER.debug("primitive received: " + primitiveReceived);
        if(primitive == ServerPrimitives.OE_SUCCESSFUL){
          String[] returnTrue = {"true"};
          response.delete();
          return returnTrue;
View Full Code Here

TOP

Related Classes of unibg.overencrypt.protocol.ServerPrimitives

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.