Having issues finding out how many bytes are sent/recieved from a socket.

Hello everyone.
I've searched the forums and also google and it seems I can't find a way to figure out how many bytes are sent from a socket and then how many bytes are read in from a socket.
My server program accepts a string (an event) and I parse that string up, gathering the relevant information and I need to send it to another server for more processing.
Inside my server program after receiving the data ( a string) I then open another port and send it off to the other server. But I would like to know how many bytes I send from my server to the other server via the client socket.
So at the end of the connection I can compare the lengths to make sure, I sent as many bytes as the server on the other end received.
Here's my run() function in my server program (my server is multi threaded, so on each new client connection it spawns a new thread and does the following):
NOTE: this line is where it sends the string to the other server:
//sending the string version of the message object to the
                    //output server
                    out.println(msg.toString());
//SERVER
public class MultiThreadServer implements Runnable {
     Socket csocket;
     MultiThreadServer(Socket csocket) {
          this.csocket = csocket;
     public void run() {
          //setting up sockets
          Socket outputServ = null;
          //create a message database to store events
          MessageDB testDB = new MessageDB();
          try {
               //setting up channel to recieve events from the omnibus server
               BufferedReader in = new BufferedReader(new InputStreamReader(
                         csocket.getInputStream()));
               //This socket will be used to send events to the z/OS reciever
               //we will need a new socket each time because this is a multi-threaded
               //server thus, the  z/OS reciever (outputServ) will need to be
               //multi threaded to handle all the output.
               outputServ = new Socket("localhost", 1234);
               //Setting up channel to send data to outputserv
               PrintWriter out = new PrintWriter(new OutputStreamWriter(outputServ
                         .getOutputStream()));
               String input;
               //accepting events from omnibus server and storing them
               //in a string for later processing.
               while ((input = in.readLine()) != null) {
                    //accepting and printing out events from omnibus server
                    //also printing out connected client information
                    System.out.println("Event from: "
                              + csocket.getInetAddress().getHostName() + "-> "
                              + input + "\n");
                    System.out.println("Waiting for data...");
                    //---------putting string into a message object-------------///
                    // creating a scanner to parse
                    Scanner scanner = new Scanner(input);
                    Scanner scannerPop = new Scanner(input);
                    //Creating a new message to hold information
                    Message msg = new Message();                    
                    //place Scanner object here:
                    MessageParser.printTokens(scanner);
                    MessageParser.populateMessage(scannerPop, msg, input);
                    //calculating the length of the message once its populated with data
                    int length = msg.toString().length();
                    msg.SizeOfPacket = length;
                    //Printing test message
                    System.out.println("-------PRINTING MESSAGE BEFORE INSERT IN DB------\n");
                    System.out.println(msg.toString());
                    System.out.println("----------END PRINT----------\n");
                    //adding message to database
                    testDB.add(msg);
                    System.out.println("-------Accessing data from Map----\n");
                    testDB.print();
                    //---------------End of putting string into a message object----//
                    //sending the string version of the message object to the
                    //output server
                    out.println(msg.toString());
                    System.out.println("Waiting for data...");
                    out.flush();
               //cleaning up
               System.out.println("Connection closed by client.");
               in.close();
               out.close();
               outputServ.close();
               csocket.close();
          catch (SocketException e) {
               System.err.println("Socket error: " + e);
          catch (UnknownHostException e) {
               System.out.println("Unknown host: " + e);
          } catch (IOException e) {
               System.out.println("IOException: " + e);
}Heres the other server that is accepting the string:
public class MultiThreadServer implements Runnable {
     Socket csocket;
     MultiThreadServer(Socket csocket) {
          this.csocket = csocket;
     public void run() {
          try {
               //setting up channel to recieve events from the parser server
               BufferedReader in = new BufferedReader(new InputStreamReader(
                         csocket.getInputStream()));
               String input;
               while ((input = in.readLine()) != null) {
                    //accepting and printing out events from omnibus server
                    //also printing out connected client information
                    System.out.println("Event from: "
                              + csocket.getInetAddress().getHostName() + "-> "
                              + input + "\n");
System.out.println("Lenght of the string was: " + input.length());
                    System.out.println("Waiting for data...");
               //cleaning up
               System.out.println("Connection closed by client.");
               in.close();
               csocket.close();
          } catch (IOException e) {
               System.out.println(e);
               e.printStackTrace();
}Here's an example of the program works right now:
Someone sends me a string such as this:
Enter port to run server on:
5656
Listening on : ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=5656]
Waiting for client connection...
Socket[addr=/127.0.0.1,port=4919,localport=5656] connected.
hostname: localhost
Ip address: 127.0.0.1:5656
Waiting for data...
Event from: localhost-> UPDATE: "@busch2.raleigh.ibm.com->NmosPingFail1",424,"9.27.132.139","","Omnibus","Precision Monitor Probe","Precision Monitor","@busch2.raleigh.ibm.com->NmosPingFail",5,"Ping fail for 9.27.132.139: ICMP reply timed out",07/05/07 12:29:12,07/03/07 18:02:31,07/05/07 12:29:09,07/05/07 12:29:09,0,1,194,8000,0,"",65534,0,0,0,"NmosPingFail",0,0,0,"","",0,0,"",0,"0",120,1,"9.27.132.139","","","","dyn9027132107.raleigh.ibm.com","","","",0,0,"","","NCOMS",424,""
Now my program makes it all nice and filters out the junk and resends the new string to the other server running here:
Enter port to run server on:
1234
Listening on : ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=1234]
Waiting for client connection...
Socket[addr=/127.0.0.1,port=4920,localport=1234] connected.
Parser client connected.
hostname: localhost
Ip address: 127.0.0.1:1234
Event from: localhost-> PacketType: UPDATE , SizeOfPacket: 577 , PacketID: 1, Identifer: UPDATE: "@busch2.raleigh.ibm.com->NmosPingFail1" , Serial: 424 , Node: "9.27.132.139" , NodeAlias: "" , Manager: "Omnibus" , Agent: "Precision Monitor Probe" , AlertGroup: "Precision Monitor" , AlertKey: "@busch2.raleigh.ibm.com->NmosPingFail" , Severity: 5 , Summary: "Ping fail for 9.27.132.139: ICMP reply timed out",StateChange: 07/05/07 12:29:12 , FirstOccurance: 07/03/07 18:02:31 , LastOccurance: 07/05/07 12:29:09 , InternalLast: 07/05/07 12:29:09 , EventId: "NmosPingFail" , LocalNodeAlias: "9.27.132.139"
Lenght of the string was: 579
The length of the final string I sent is 577 by using the string.length() function, but when I re-read the length after the send 2 more bytes got added, and now the length is 579.
I tested it for several cases and in all cases its adding 2 extra bytes.
Anyways, I think this is a bad solution to my problem but is the only one I could think of.
Any help would be great!

(a) You are counting characters, not bytes, and you aren't counting the line terminators that are appended by println() and removed by readLine().
(b) You don't need to do any of this. TCP doesn't lose data. If the receiver manages get as far as reading the line terminator when reading a line, the line will be complete. Otherwise it will get an exception.
(c) You are assuming that the original input and the result of message.toString() after constructing a Message from 'input' are the same but there is no evidence to this effect in the code you've posted. Clearly this assumption is what is at fault.
(d) If you really want to count bytes, write yourself a FilterInputStream and a FilterOutputStream and wrap them around the socket streams before decorating them with the readers you are using. Have these classes count the bytes going past.
(e) Don't use PrintWriter or PrintStream on socket streams unless you like exceptions being ignored. Judging by your desire to count characters, you shouldn't like this at all. Use BufferedWriter's methods to write strings and line terminators.

Similar Messages

  • How to find out how many users are connected to Exchange 2013 servers in "Online" mode? This is coz, online mode causing server performance issues in our environment

    All, Any script or method to find out how many users are connected to exchange servers in online mode?
    Manju Gowda

    Hi 
    You have to get the "RPC Client Access" log file in your CAS server. There you can see a column called "client-mode" and it has two modes such
    as "classic" and "cached". From there you can get the two different client assess modes and their corresponding users.
    probably take this file openup on excel and filter to see the two modes
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish
    (MVP)

  • How can we find out how many programs are stored in a percticular package

    Hi,
    I need to find out how many programs are stored in aperticular package.
    For example we are having one package in our project. I need to give all saved programs details into this project. How can we find this.
    Thanks in advance.

    Hi,
    From TADIR table we can find out.
    Regards,
    Jyothi CH.

  • Need to find out how many users are using Siebel Application

    Hello all,
    I need to find out how many users are using Siebel Application?
    Is there a way I can find out?
    Thanks.
    yasun

    Hi,
    Read the following:
    http://docs.oracle.com/cd/B40099_02/books/SysDiag/SysDiagSysMonitor30.html
    http://docs.oracle.com/cd/B40099_02/books/SysDiag/SysDiagSysMonitor17.html
    For full information about server status and statistics red:
    http://docs.oracle.com/cd/B40099_02/books/SysDiag/SysDiagSysMonitor.html
    T.Abed

  • Can I find out how many clients are connected to a server process?

    Hi, I am hoping I can find out how many clients are connected to a server process. This could be either a programmatic lookout number, a number in a log file etc.
    By the way, does lookout have any application (not data) logs? I have noticed that occasionally lookout will crash and I cannot find any logs to determine why, what processes were running, who last accessed it etc.
    Thanks

    Hello,
    There's currently no way to acquire this data. I think that'd be a great suggestion for the product. Please submit your feedback to our developers at the following link: http://digital.ni.com/applications/psc.nsf/default?OpenForm&temp1=&node=
    Best regards,
    Yusuf C
    Application Engineer
    National Instruments

  • ADF: Best way to find out how many rows are fetched?

    Hello,
    I have overridden method executeQueryForCollection of ViewObject in which I execute supper.executeQueryForCollection and after that want to find out how many rows are fetched during the execution.
    If I try to use getFetchedRowCount I always get "0", if using getEstimatedRowCount, query are being re-executed.
    What method is better to use for that?
    Thank you,
    Veniamin Goldin
    Forbis, Ltd.

    I have a 'home-made' view called RBS, whose definition is this:
    create view RBS as
    select /*+ RULE  */ substr(s.username,1,10) oracle,
           substr(case when s.osuser like 'oramt%'
                       then nvl(upper(s.client_info),'client_info not set')
                       else substr(s.machine,instr(s.machine, '\')+1,length(s.machine))||':'||s.osuser
                  end
                  ,1,20) CLIENT
    ,      substr(''''||s.sid||','||s.serial#||''''||decode(s.status,'KILLED','*',''),1,12) kill_id
    ,      lpad(to_char(t.xidusn),4) rbs#
    ,      lpad(to_char(t.used_ublk),4) ublk
    ,      lpad(to_char(t.used_urec),8) urecords
    ,      i.block_gets
    ,      lpad(to_number(round((sysdate - to_date(t.start_time,'MM/DD/YY HH24:MI:SS')) * 60 * 60 * 24)),9) time
    ,      upper(substr(s.program,1,20)) PROGRAM
    ,      to_char(s.LOGON_TIME,'HH24:MI:SS DD-MON') LOGIN_TIME
    from   sys.v_$transaction t
    ,      sys.v_$session s
    ,      sys.v_$sess_io i
    ,      sys.v_$process p
    where  s.saddr = t.ses_addr
    and    i.sid = s.sid
    and    p.addr = s.paddr
    /By monitoring the URECORDS column value of the row that corresponds to my session doing a transaction, I can see how it progresses.
    Toon

  • Using powershell to find out how many people are using the on-prem SkyDrive

    Hi
    Is there a way of using powershell to find out how many people are using the on-prem SkyDrive?
    Thank you.

    Hi,
    According to your post, my understanding is that you wanted to use PowerShell to find out the users who use the on premise SkyDrive.
    As this is the forum for SharePoint Server, I recommend you post your question to the forum for PowerShell or SkyDrive.
    Windows PowerShell forum:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverpowershell
    SkyDrive forum:
    http://answers.microsoft.com/en-us/onedrive/forum/sdsignin?tab=Threads
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Find out how many records are updated.

    Hello,
    I am executing a Update Statement in a loop from a JSP page this is working good.
    Suppose if there are 10 records and I update 4 records, it gets updated fine.
    What I now need is to find out how many records have been updated. How can I know this?
    Thanks

    statement.executeUpdate() returns the number of records updated.
    Sai Pullabhotla

  • To find out how many rows are processed/updated?

    Hi Gurus,
    I have given an update statement with parallelism. The data to be processed is huge around 50 million records.
    I know that from OEM, we can find out how many rows it has processed or completed. I would like to know the dictionary view/ query to find out the same in SQL Plus.
    Thanks
    Cherrish Vaidiyan

    I have a 'home-made' view called RBS, whose definition is this:
    create view RBS as
    select /*+ RULE  */ substr(s.username,1,10) oracle,
           substr(case when s.osuser like 'oramt%'
                       then nvl(upper(s.client_info),'client_info not set')
                       else substr(s.machine,instr(s.machine, '\')+1,length(s.machine))||':'||s.osuser
                  end
                  ,1,20) CLIENT
    ,      substr(''''||s.sid||','||s.serial#||''''||decode(s.status,'KILLED','*',''),1,12) kill_id
    ,      lpad(to_char(t.xidusn),4) rbs#
    ,      lpad(to_char(t.used_ublk),4) ublk
    ,      lpad(to_char(t.used_urec),8) urecords
    ,      i.block_gets
    ,      lpad(to_number(round((sysdate - to_date(t.start_time,'MM/DD/YY HH24:MI:SS')) * 60 * 60 * 24)),9) time
    ,      upper(substr(s.program,1,20)) PROGRAM
    ,      to_char(s.LOGON_TIME,'HH24:MI:SS DD-MON') LOGIN_TIME
    from   sys.v_$transaction t
    ,      sys.v_$session s
    ,      sys.v_$sess_io i
    ,      sys.v_$process p
    where  s.saddr = t.ses_addr
    and    i.sid = s.sid
    and    p.addr = s.paddr
    /By monitoring the URECORDS column value of the row that corresponds to my session doing a transaction, I can see how it progresses.
    Toon

  • How do I find out how many fans are there in a router with the help of CLI? Specifically cisco3845 with ios c3845-spservicesk9-mz.124-3b.bin

           I have an issue where show env o/p is as below, I suspect the FAN 1 which shows failed is not present in router, how do i find out with the help of CLI , how many fans are present in router.
    #show environment all
    SYS PS1 is present.
           Fan status: Normal
           Input Voltage status: Normal
           DC Output Voltage status: Normal
           Type: AC
           Thermal status: Normal
    SYS PS2 is present.
           Fan status: Normal
           Input Voltage status: Normal
           DC Output Voltage status: Normal
           Type: AC
           Thermal status: Normal
    AUX(-48V) PS1 is absent.
    AUX(-48V) PS2 is absent.
    Fan 1 Failed
    Fan 2 Normal
    Fan 3 Normal
    Fan Speed is Normal
    Alert settings:
    Intake temperature warning: Enabled, Threshold: 55 Core temperature warning: Enabled, Threshold: 70 (CPU: 90)
    Board Temperature: Normal
    Internal-ambient temperature = 28, Normal CPU temperature = 41, Normal Intake temperature = 22, Normal Backplane temperature = 19, Normal
    Voltage 1(3300) is Normal, Current voltage = 3284 mV Voltage 2(5150) is Normal, Current voltage = 5153 mV Voltage 3(2500) is Normal, Current voltage = 2525 mV Voltage 4(1200) is Normal, Current voltage = 1203 mV
    Nominal frequency

    This means that FAN1 has failed.
    Fan 1 Failed
    Feb 14 07:31:01.996 GMT: %FAN-3-FAN_FAILED: Fan 1 had a rotation error reported.
    Feb 14 07:31:21.996 GMT: %FAN-3-FAN_FAILED: Fan 1 had a rotation error reported.
    Feb 14 07:31:41.995 GMT: %FAN-3-FAN_FAILED: Fan 1 had a rotation error reported.
    Feb 14 07:32:01.994 GMT: %FAN-3-FAN_FAILED: Fan 1 had a rotation error reported. Feb 14 07:31:01.996 GMT: %FAN-3-FAN_FAILED: Fan 1 had a rotation error reported.
    Feb 14 07:31:21.996 GMT: %FAN-3-FAN_FAILED: Fan 1 had a rotation error reported.
    Feb 14 07:31:41.995 GMT: %FAN-3-FAN_FAILED: Fan 1 had a rotation error reported.
    Feb 14 07:32:01.994 GMT: %FAN-3-FAN_FAILED: Fan 1 had a rotation error reported.

  • OutputStream: How many bytes are sent?

    Dear Friends,
    I use the following code to upload a file.
    byte[] buf = new byte[5000];
            int nread;
            int navailable;
          synchronized (in) {
              while((nread = in.read(buf, 0, buf.length)) >= 0) {
                    //Transfer
                    out.flush();
                    out.write(buf, 0, nread);
                    out.flush();
            buf = null;But how can I know how many bytes already are sent?
    Is there a good way to do that?
    Thank you!
    With best regards
    Inno

    OK, but don't be scared ;-)
    EDIT: Does someone know why?
    Do you need more information?
    Only the function connect(), pipe() and the declarations are important.
    Ignore all the other ones, please. :-)
    import java.applet.Applet;
    import java.io.OutputStream;
    import java.net.URLConnection;
    import java.net.URL;
    import java.io.IOException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.HashMap;
    import java.util.Map;
    import java.io.File;
    import java.io.InputStream;
    import java.util.Random;
    import java.io.FileInputStream;
    import java.util.Iterator;
    import javax.swing.JProgressBar;
    * <p>Title: Client HTTP Request class</p>
    * <p>Description: this class helps to send POST HTTP requests with various form data,
    * including files. Cookies can be added to be included in the request.</p>
    * @author Vlad Patryshev
    * @version 1.0
    public class ClientHttpRequest  extends Thread {
        URLConnection connection;
        OutputStream os = null;
        Map cookies = new HashMap();
         long filesize;
        private OutputStream osw=null;
        protected void connect() throws IOException {
            if (os == null)os = connection.getOutputStream();
        protected void write(char c) throws IOException {
            connect();
            os.write(c);
        protected void write(String s) throws IOException {
            connect();
            os.write(s.getBytes());
        protected void newline() throws IOException {
            connect();
            write("\r\n");
        protected void writeln(String s) throws IOException {
            connect();
            write(s);
            newline();
        private  Random random = new Random();
        protected  String randomString() {
            return Long.toString(random.nextLong(), 36);
        String boundary = "---------------------------" + randomString() + randomString() + randomString();
        private void boundary() throws IOException {
            write("--");
            write(boundary);
         * Creates a new multipart POST HTTP request on a freshly opened URLConnection
         * @param connection an already open URL connection
         * @throws IOException
        public ClientHttpRequest(URLConnection connection) throws IOException {
            this.connection = connection;
            connection.setDoOutput(true);
            connection.setRequestProperty("Content-Type",
                    "multipart/form-data; boundary=" + boundary);
            connection.addRequestProperty("Accept-Encoding", "gzip,deflate"); //Bugfix by AS: needed for PHP.
            connection.setUseCaches(true);
         * Creates a new multipart POST HTTP request for a specified URL
         * @param url the URL to send request to
         * @throws IOException
        public ClientHttpRequest(URL url) throws IOException {
            this(url.openConnection());
        public ClientHttpRequest() throws IOException {
         * Creates a new multipart POST HTTP request for a specified URL string
         * @param urlString the string representation of the URL to send request to
         * @throws IOException
        public ClientHttpRequest(String urlString) throws IOException {
            this(new URL(urlString));
        private void postCookies() {
            StringBuffer cookieList = new StringBuffer();
            for (Iterator i = cookies.entrySet().iterator(); i.hasNext();) {
                Map.Entry entry = (Map.Entry)(i.next());
                cookieList.append(entry.getKey().toString() + "=" + entry.getValue());
                if (i.hasNext()) {
                    cookieList.append("; ");
            if (cookieList.length() > 0) {
                connection.setRequestProperty("Cookie", cookieList.toString());
         * adds a cookie to the requst
         * @param name cookie name
         * @param value cookie value
         * @throws IOException
        public void setCookie(String name, String value) throws IOException {
            cookies.put(name, value);
         * adds cookies to the request
         * @param cookies the cookie "name-to-value" map
         * @throws IOException
        public void setCookies(Map cookies) throws IOException {
            if (cookies == null) return;
            this.cookies.putAll(cookies);
         * adds cookies to the request
         * @param cookies array of cookie names and values (cookies[2*i] is a name, cookies[2*i + 1] is a value)
         * @throws IOException
        public void setCookies(String[] cookies) throws IOException {
            if (cookies == null) return;
            for (int i = 0; i < cookies.length - 1; i+=2) {
                setCookie(cookies, cookies[i+1]);
    private void writeName(String name) throws IOException {
    newline();
    write("Content-Disposition: form-data; name=\"");
    write(name);
    write('"');
    * adds a string parameter to the request
    * @param name parameter name
    * @param value parameter value
    * @throws IOException
    public void setParameter(String name, String value) throws IOException {
    boundary();
    writeName(name);
    newline(); newline();
    writeln(value);
    private void pipe(InputStream in, OutputStream out) throws IOException {
    //System.out.println("Output: "+out);
    byte[] buf = new byte[5000];
    int nread;
    int navailable;
    long total = 0; //Menge an Bytes bisher gesendet
    int percentage = 0; //Percent done...
    int oldpercent = 0;
    synchronized (in) {
    while((nread = in.read(buf, 0, buf.length)) >= 0) {
    //Transfer
    out.flush();
    out.write(buf, 0, nread);
    out.flush();
    total += nread; //Wieviel bereits gesendet?
    percentage = (int)( ( total * 100.0 ) / filesize );
    //System.out.println("STAT_ sent: "+total+" total: "+filesize);
    if(oldpercent < percentage){
    //System.out.println("%: " + percentage);
    SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
    String uhrzeit = sdf.format(new Date());
    System.out.println(uhrzeit+": Bytes sent: "+total);
    //listener.setProgressStatus(percentage);
    oldpercent = percentage;
    buf = null;
    * adds a file parameter to the request
    * @param name parameter name
    * @param filename the name of the file
    * @param is input stream to read the contents of the file from
    * @throws IOException
    public void setParameter(String name, String filename, InputStream is) throws IOException {
    boundary();
    writeName(name);
    write("; filename=\"");
    write(filename);
    write('"');
    newline();
    write("Content-Type: ");
    String type = connection.guessContentTypeFromName(filename);
    if (type == null) type = "application/octet-stream";
    writeln(type);
    newline();
    pipe(is, os);
    newline();
    * adds a file parameter to the request
    * @param name parameter name
    * @param file the file to upload
    * @throws IOException
    public void setParameter(String name, File file) throws IOException {
    filesize = file.length();
    setParameter(name, file.getPath(), new FileInputStream(file));
    * adds a parameter to the request; if the parameter is a File, the file is uploaded, otherwise the string value of the parameter is passed in the request
    * @param name parameter name
    * @param object parameter value, a File or anything else that can be stringified
    * @throws IOException
    public void setParameter(String name, Object object) throws IOException {
    if (object instanceof File) {
    setParameter(name, (File) object);
    } else {
    setParameter(name, object.toString());
    * adds parameters to the request
    * @param parameters "name-to-value" map of parameters; if a value is a file, the file is uploaded, otherwise it is stringified and sent in the request
    * @throws IOException
    public void setParameters(Map parameters) throws IOException {
    if (parameters == null) return;
    for (Iterator i = parameters.entrySet().iterator(); i.hasNext();) {
    Map.Entry entry = (Map.Entry)i.next();
    setParameter(entry.getKey().toString(), entry.getValue());
    * adds parameters to the request
    * @param parameters array of parameter names and values (parameters[2*i] is a name, parameters[2*i + 1] is a value); if a value is a file, the file is uploaded, otherwise it is stringified and sent in the request
    * @throws IOException
    public void setParameters(Object[] parameters) throws IOException {
    if (parameters == null) return;
    for (int i = 0; i < parameters.length - 1; i+=2) {
    setParameter(parameters[i].toString(), parameters[i+1]);
    * posts the requests to the server, with all the cookies and parameters that were added
    * @return input stream with the server response
    * @throws IOException
    public InputStream post() throws IOException {
    boundary();
    writeln("--");
    os.close();
    return connection.getInputStream();
    * posts the requests to the server, with all the cookies and parameters that were added before (if any), and with parameters that are passed in the argument
    * @param parameters request parameters
    * @return input stream with the server response
    * @throws IOException
    * @see setParameters
    public InputStream post(Map parameters) throws IOException {
    setParameters(parameters);
    return post();
    * posts the requests to the server, with all the cookies and parameters that were added before (if any), and with parameters that are passed in the argument
    * @param parameters request parameters
    * @return input stream with the server response
    * @throws IOException
    * @see setParameters
    public InputStream post(Object[] parameters) throws IOException {
    setParameters(parameters);
    return post();
    * posts the requests to the server, with all the cookies and parameters that were added before (if any), and with cookies and parameters that are passed in the arguments
    * @param cookies request cookies
    * @param parameters request parameters
    * @return input stream with the server response
    * @throws IOException
    * @see setParameters
    * @see setCookies
    public InputStream post(Map cookies, Map parameters) throws IOException {
    setCookies(cookies);
    setParameters(parameters);
    return post();
    * posts the requests to the server, with all the cookies and parameters that were added before (if any), and with cookies and parameters that are passed in the arguments
    * @param cookies request cookies
    * @param parameters request parameters
    * @return input stream with the server response
    * @throws IOException
    * @see setParameters
    * @see setCookies
    public InputStream post(String[] cookies, Object[] parameters) throws IOException {
    setCookies(cookies);
    setParameters(parameters);
    return post();
    * post the POST request to the server, with the specified parameter
    * @param name parameter name
    * @param value parameter value
    * @return input stream with the server response
    * @throws IOException
    * @see setParameter
    public InputStream post(String name, Object value) throws IOException {
    setParameter(name, value);
    return post();
    * post the POST request to the server, with the specified parameters
    * @param name1 first parameter name
    * @param value1 first parameter value
    * @param name2 second parameter name
    * @param value2 second parameter value
    * @return input stream with the server response
    * @throws IOException
    * @see setParameter
    public InputStream post(String name1, Object value1, String name2, Object value2) throws IOException {
    setParameter(name1, value1);
    return post(name2, value2);
    * post the POST request to the server, with the specified parameters
    * @param name1 first parameter name
    * @param value1 first parameter value
    * @param name2 second parameter name
    * @param value2 second parameter value
    * @param name3 third parameter name
    * @param value3 third parameter value
    * @return input stream with the server response
    * @throws IOException
    * @see setParameter
    public InputStream post(String name1, Object value1, String name2, Object value2, String name3, Object value3) throws IOException {
    setParameter(name1, value1);
    return post(name2, value2, name3, value3);
    * post the POST request to the server, with the specified parameters
    * @param name1 first parameter name
    * @param value1 first parameter value
    * @param name2 second parameter name
    * @param value2 second parameter value
    * @param name3 third parameter name
    * @param value3 third parameter value
    * @param name4 fourth parameter name
    * @param value4 fourth parameter value
    * @return input stream with the server response
    * @throws IOException
    * @see setParameter
    public InputStream post(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4) throws IOException {
    setParameter(name1, value1);
    return post(name2, value2, name3, value3, name4, value4);
    * posts a new request to specified URL, with parameters that are passed in the argument
    * @param parameters request parameters
    * @return input stream with the server response
    * @throws IOException
    * @see setParameters
    public InputStream post(URL url, Map parameters) throws IOException {
    return new ClientHttpRequest(url).post(parameters);
    * posts a new request to specified URL, with parameters that are passed in the argument
    * @param parameters request parameters
    * @return input stream with the server response
    * @throws IOException
    * @see setParameters
    public InputStream post(URL url, Object[] parameters) throws IOException {
    return new ClientHttpRequest(url).post(parameters);
    * posts a new request to specified URL, with cookies and parameters that are passed in the argument
    * @param cookies request cookies
    * @param parameters request parameters
    * @return input stream with the server response
    * @throws IOException
    * @see setCookies
    * @see setParameters
    public InputStream post(URL url, Map cookies, Map parameters) throws IOException {
    return new ClientHttpRequest(url).post(cookies, parameters);
    * posts a new request to specified URL, with cookies and parameters that are passed in the argument
    * @param cookies request cookies
    * @param parameters request parameters
    * @return input stream with the server response
    * @throws IOException
    * @see setCookies
    * @see setParameters
    public InputStream post(URL url, String[] cookies, Object[] parameters) throws IOException {
    return new ClientHttpRequest(url).post(cookies, parameters);
    * post the POST request specified URL, with the specified parameter
    * @param name parameter name
    * @param value parameter value
    * @return input stream with the server response
    * @throws IOException
    * @see setParameter
    public InputStream post(URL url, String name1, Object value1) throws IOException {
    return new ClientHttpRequest(url).post(name1, value1);
    * post the POST request to specified URL, with the specified parameters
    * @param name1 first parameter name
    * @param value1 first parameter value
    * @param name2 second parameter name
    * @param value2 second parameter value
    * @return input stream with the server response
    * @throws IOException
    * @see setParameter
    public InputStream post(URL url, String name1, Object value1, String name2, Object value2) throws IOException {
    return new ClientHttpRequest(url).post(name1, value1, name2, value2);
    * post the POST request to specified URL, with the specified parameters
    * @param name1 first parameter name
    * @param value1 first parameter value
    * @param name2 second parameter name
    * @param value2 second parameter value
    * @param name3 third parameter name
    * @param value3 third parameter value
    * @return input stream with the server response
    * @throws IOException
    * @see setParameter
    public InputStream post(URL url, String name1, Object value1, String name2, Object value2, String name3, Object value3) throws IOException {
    return new ClientHttpRequest(url).post(name1, value1, name2, value2, name3, value3);
    * post the POST request to specified URL, with the specified parameters
    * @param name1 first parameter name
    * @param value1 first parameter value
    * @param name2 second parameter name
    * @param value2 second parameter value
    * @param name3 third parameter name
    * @param value3 third parameter value
    * @param name4 fourth parameter name
    * @param value4 fourth parameter value
    * @return input stream with the server response
    * @throws IOException
    * @see setParameter
    public InputStream post(URL url, String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4) throws IOException {
    return new ClientHttpRequest(url).post(name1, value1, name2, value2, name3, value3, name4, value4);
    With best regards!
    MfG
    Inno
    Message was edited by:
    Innocentus

  • Find out how many users are downloading Office365 C2R

    I am an it manager at a college in Northern Ireland we have 20K+ users with active accounts and have offered them Office 365 through the student and Faculty advantage programs. We have registered everyone with the appropriate licenses and are happy
    that everything works. My question is, how do I see how many of the users have downloaded office365? I can see how many licences we have and I can see from my own control panel that I have used 2 of my 10 (5 PC plus 5 Android or IOS) downloads but I can't
    see anywhere if anyone else is taking up the offer. Short of actually asking everyone, is there a straight forward way to find this out?

    Hi Brian
    This is the forum to discuss questions and feedback for Microsoft Office client. There is not so much about
    Office 365 Admin/Server aspects here, I would suggest you to post in the dedicated forum of
    Office 365 Community, where you can get more experienced responses:
    http://community.office365.com/en-us/f/default.aspx
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How to find out how many users are usuing particular report in bw

    Hi ,
    pls let me know is there any T - code to find how many users usuing specific report in SAP BW.
    REGARDS
    Ravi prakash

    Hi Ravi prakash,
    using BI Statistics Report we can know how many user using a report and which reports are executed by user and time navigations....
    need to install BI statistics in system first.
    Please check SAP help for the same.
    Documentation BI Query Runtime Statistics
    [http://help.sap.com/saphelp_nw7.0/helpdata/en/43/e37f8a6df402d3e10000000a1553f7/frameset.htm]
    Documentation BI Administration Cockpit
    [http://help.sap.com/saphelp_nw7.0/helpdata/de/44/08a75d19e32d2fe10000000a11466f/frameset.htm]
    Best Regards.

  • How can I find out how many checkboxes are checked, please!

    Hello everyone,
    I have been at it for hours and pretty much cannot think straight and would highly apprecaite your help on this. I have an array called myArr which has 5 elements in it. I then generate checkboxes and the number of checkboxes are matched with the myArr.length(); I would like to be able to find out what checkboxes are check/selected before moving to the next screen. User will need to click on a "NEXT' button in order to move to the next screen. Next button is disabled until user selects the checkbox(s).
    here is the code:
    var cb:CheckBox;
    captionArr:Array = new Array('img1' , 'img2', 'img3', 'img4', 'img5');
    myArr:Array = new Array('c1', 'c2', 'c3', 'c4', 'c5');
    for(var i:Number=0; i < myArr.length; i++)
       cb = new CheckBox();
      cb.y = i * 25;
      cb.label = captionArr[i];         //  CHECKBOX LABELS
      addChild(cb);
      cb.addEventListener(MouseEvent.CLICK, clickHandler);
    function clickHandler(e:MouseEvent):void
         if(e.target.selected)
             trace(''SELECTED");
        else if(!e.target.selected)
         trace("NOT SELECTED");
    Thanks.

    use checkCBF():
    var cb:CheckBox;
    captionArr:Array = new Array('img1' , 'img2', 'img3', 'img4', 'img5');
    myArr:Array = new Array('c1', 'c2', 'c3', 'c4', 'c5');
    var cbA:Array=[];
    for(var i:Number=0; i < myArr.length; i++)
       cb = new CheckBox();
      cb.y = i * 25;
      cb.label = captionArr[i];         //  CHECKBOX LABELS
    cbA.push(cb);
      addChild(cb);
      cb.addEventListener(MouseEvent.CLICK, clickHandler);
    function clickHandler(e:MouseEvent):void
         if(e.target.selected)
             trace(''SELECTED");
        else if(!e.target.selected)
         trace("NOT SELECTED");
    function checkCBF(){
    for(var i:Number=0; i < cbA.length; i++){
    if(cbA[i].selected){
    //cbA[i] selected
    } else {
    //cbA[i] not selected

  • Find Out how many users are currently logged into

    Hi,
    Is there any way for us to find out in IDM application
    who are all the currently logged in active users.
    If I run audit log report I can just get all the users logged in and logged out and not the currently logged in users.
    This is just administartive purpose to , its not a requirement.
    Thanks,
    pandu

    Try /debug/Show_CacheSummary.jsp. Possibly the user session section will be of help.

Maybe you are looking for