Package com.myjavatools.web

Examples of com.myjavatools.web.ClientHttpRequest.post()


      chr.setParameter(SCREEN, screenInfo);     
      String blockInfo = Integer.toString(block.getWidth()) + "x" + Integer.toString(block.getHeight());
      chr.setParameter(BLOCK, blockInfo);
      chr.setParameter(EVENT, CaptureEvents.CAPTURE_START.getEvent());
      chr.setParameter(USE_SVC2, Boolean.toString(useSVC2));
      chr.post();
    } catch (IOException e) {
      e.printStackTrace();
      throw new ConnectionException("IOException while sending capture start event.");
    }
View Full Code Here


    try {
      chr = new ClientHttpRequest(conn);
      chr.setParameter(ROOM, room);
      chr.setParameter(SEQ_NUM, seqNumGenerator.getNext());
      chr.setParameter(EVENT, CaptureEvents.CAPTURE_END.getEvent());
      chr.post();
    } catch (IOException e) {
      e.printStackTrace();
      throw new ConnectionException("IOException while sending capture end event.");
    }
  }
View Full Code Here

          chr.setParameter(changed_blocks_upload_filename, "block"+i, new ByteArrayInputStream(block.getVideoData()));

        } // append each changed-block to the form

        // Post the multi-part form to the server
        chr.post();
        HttpURLConnection httpConnection = (HttpURLConnection) chr.connection;
        int status = httpConnection.getResponseCode();
       
        System.out.println("******* POST status = [" + status + "] ***************");
       
View Full Code Here

      chr.setParameter(ROOM, room);
      chr.setParameter(SEQ_NUM, seqNumGenerator.getNext());
      chr.setParameter(EVENT, CaptureEvents.MOUSE_LOCATION_EVENT.getEvent());
      chr.setParameter(MOUSEX, mouseLoc.x);
      chr.setParameter(MOUSEY, mouseLoc.y);
      chr.post();   
      } catch (IOException e) {
        e.printStackTrace();
      } catch (ConnectionException e) {
        System.out.println("ERROR: Failed to send block data.");
      }
View Full Code Here

        chr.setParameter(POSITION, blockData.getPosition());
        chr.setParameter(KEYFRAME, blockData.isKeyFrame());
        chr.setParameter(EVENT, CaptureEvents.CAPTURE_UPDATE.getEvent());
      ByteArrayInputStream block = new ByteArrayInputStream(blockData.getVideoData());       
      chr.setParameter(BLOCKDATA, "block", block);
      chr.post();
               //         try {
               //         Thread.sleep(1000);
               //         }
               //         catch (InterruptedException e)
               //         { }
View Full Code Here

      //StringBuilder sb = new StringBuilder(videoWidth);
      //sb.append("x").append(videoHeight);

      chr.setParameter("videoInfo", videoInfo);
      chr.setParameter("event", CaptureEvents.CAPTURE_START.getEvent());
      chr.post();
    } catch (IOException e) {
      e.printStackTrace();
      throw new ConnectionException("IOException while sending capture start event.");
    }
View Full Code Here

    try {
      chr = new ClientHttpRequest(conn);
      chr.setParameter("room", room);
     
      chr.setParameter("event", CaptureEvents.CAPTURE_END.getEvent());
      chr.post();
    } catch (IOException e) {
      e.printStackTrace();
      throw new ConnectionException("IOException while sending capture end event.");
    }
  }
View Full Code Here

      ByteArrayInputStream cap = new ByteArrayInputStream(videoData.toByteArray());
       
      chr.setParameter("videodata", "screen", cap);
      System.out.println("Video data length = " + videoData.toByteArray().length);
     
      chr.post();   
    } catch (IOException e) {
      e.printStackTrace();
      throw new ConnectionException("IOException while sending video data.");
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.