Seing how many objects are selected.

Hi! I'm having a problem seing how many objects are selected when I navigate in Finder's windows. In Snow Leopard, there used to be a grey bar at the bottom telling you these infos, but this seems to be gone in Lion. Anyone knows how to get it back?
Thank you!

Open the Document Info Palette.
Find its secret little flyout menu.
Select from that menu "Objects".
Let go.
Then go to that same menu all over again and select "Selection Only".
Scroll through the list and sum the quantities shown. Except be careful not to include the count of "All Text Objects" with the counts of "Point Type Objects", "Area Type Objects", and "Type On A Path Objects".
Repeat those steps every time you start a new work session in AI, because AI's palettes can't remember the way you set them between launches.
How could you have overlooked that intuitive and straightforward routine?
JET

Similar Messages

  • How Many Objects Are Selected

    How can I tell how many objects are selected when I draw a selection marque around multiple objects?

    Open the Document Info Palette.
    Find its secret little flyout menu.
    Select from that menu "Objects".
    Let go.
    Then go to that same menu all over again and select "Selection Only".
    Scroll through the list and sum the quantities shown. Except be careful not to include the count of "All Text Objects" with the counts of "Point Type Objects", "Area Type Objects", and "Type On A Path Objects".
    Repeat those steps every time you start a new work session in AI, because AI's palettes can't remember the way you set them between launches.
    How could you have overlooked that intuitive and straightforward routine?
    JET

  • How many Objects are created in this?

    Hi,
    How many objects are created in the flwg code:
    String str = new String("Hello");
    String str2 = "Hey there";
    str = str + str2;

    Depends if you're counting objects created at compile time.
    "Hello" is created at compile time. That's 1.
    new String("Hello") creates a new String object at runtime, pointing its backing array at the "Hello" in the constant pool. That's 2.
    "Hey there" is created at compile time. 3.
    str + str2 I might do everything at compile time, or it might do some at runtime. I don't know if str is considered a compile time literal here. I think not, but I'm not sure. You can check by using javap. If I'm correct, then at runtime you'll create a StringBuffer (4) and another String (5).
    So I'd say 5 objects. But if the compiler treats str as a literal and therefore can do the str+str2 at compile time, then it might do so without creating the StringBuffer. Or it might still create it at compile time, use it, and throw it out.

  • How many objects are created?

    I have this question which some one posted to me.
    He asked me how many objects are created when an object of a simple class is created for example
    class A{
    public static void main(String args[])
    A a1 = new A();
    Now how many objects are created? I think only one. Can anyone tell me if any other objects are also created.
    Plz tell me .

    No, the answer is indeed 1. All the other objects
    (including the String[] in the main method
    parameters) are created outside of the A
    class, either by the JVM itself or by some other
    class that calls the A.main() method. You can try
    this out for yourself by adding a constructor such as
    A()
    System.out.println("Creating class A");
    } and see what prints out.Take a closer look at the question:
    how many objects are created when an object of a
    simple class is created for exampleIt doesn't say "how many objects of type A are created".
    I.e. The VM has to load class A before you can create an object from it, and thus an object of type Class is created. There are also a bunch of other objects which needs to be created before you can instantiate A.
    Kaj

  • Garbage Collection: how many objects are created after for loop?

    Please see the fallowing java code
    1 public class Test1 {
    2     
    3     public static void main(String[] args) {
    4          
    5          MyObj obj = null;
    6          for(int i=0;i<5;i++){
    7               obj = new MyObj();
    8          }
    9 // do something
    10
    11     }
    12 }
    so my question is How may objects are eligible for garbage collection at line no: 9 (// do something)?

    so my question is How may objects are eligible for
    garbage collection at line no: 9 (// do something)?It's impossible to answer that question since we don't know how MyObj is implemented.
    Kaj

  • Obvious Way to Tell How Many Files are Selected?

    I’ve been trying my best to love Lightroom, and I get close, but there’s one problem that I just can’t get past.
    Five minutes ago, I tried to export one photo, and I ended up exporting 52 photos.  This happens all the time. If I had a dime for every time I exported 500 photos instead of 1 photo, moved 500 photos instead of one photo, etc, I’d have a lot of dimes.
    Anyway, I deleted the 51 extra exports, synced the folder, got everything where I wanted it, then … exported 52 photos again.
    Sigh.
    The only way I’ve been able to avoid this is in the past is by obsessively pressing Command+D.  When I’m trying to do anything, I pound these two keys like there’s no tomorrow, but of course, I have to re-select the files I do want to perform actions on.
    I kept thinking I’d get used to it, but I’m still having problems to no end.  Unless I look very, very closely, I can’t tell if photos are selected or not, and if an entire screen full of photos are selected, they all look the same, so I really can’t tell.
    That’s the background, now my questions if I may:
    Is there any way to get a dialog box before performing actions on multiple photos?  Something that says, “this action will be performed on 1,871 photos, do you want to proceed?” or something to that effect?
    Ironically, it already does this when I want to delete something, which is great, but no such luck for any other actions.
    By any chance, is there something I can do to make the number of photos I have selected, more obvious?
    I know this is not a bug or program flaw, it’s a flaw with how my brain works with the program, but if I could figure out a way to make them work together , this application would be pretty awesome.  As it is, I spend more time undoing mistakes than I do organizing and editing photos.
    Thank you very much for any help.

    I am so pleased to read your post and realize I'm not the only one that gets tripped up by this! I've bee using LR extensively for more than two years now and even today, just now, I wanted to export ONE file, and the highlighting onscreen appeared to indicate I've selected one file, but turned out it was dozens of files. Now... when I'm simply exporting copies of files to another folder it's not a dangerous situation. BUT! It is very dangerous if one wishes to delete a file or several files and you think those are the only files you're deleting. Many, many times I have caught this in time, fortunately. To me this is one example of how the experience of software designers do not well understand how the end user will understand a program. Professional photographers are very specific with everything they do and don't want a program tripping them up continually. This obvious confusion over which files are actually "selected" needs cleared up.
    I read the responses to your post and find them dissatisfying. Please, Adobe, test your software with actual working photographers and not just Adobe engineers who may also happen to be amateur photographers.

  • How many objects are in my map?

    hi all
    I nead help in a question about maps in java:
    In one map could be stored various references with diferent keys to just one real object. How can i count all objects referenced by my map? (not all references with map.size())
    Is it wise to use a set parallel to the map who contains just unique objects? Or is there an other, more beautiful solution?
    many thanx for your help
    benjamin

    If you want a more general solution you can use an interface. Now you can store any class in MyMap as long as it implements RefCount.
    interface RefCount {
       int getRef();
       void incRef();
       void decRef();
    class MyValue implements RefCount {
        private int ref;
        public int getRef() {return ref;}
        public void incRef() {ref++;}
        public void decRef() {ref--;}
    class MyMap extends HashMap {
        int objects = 0; 
        public Object put(Object key, Object value) {
            RefCount v = (RefCount) value;
            if (v.getRef() == 0)
                objects++;        // first time inserted
            v.incRef();
            return super.put(key,value); // call superclass put
        public Object remove(Object key) {
            RefCount v = (RefCount) super.remove(key); // super class remove
            if (v != null) {
                v.decRef();
                if (v.getRef() == 0)
                    objects--;        // last time removed
            return v;
        public int objectSize() { // returns number of objects.
            return objects;

  • How many String are created?

    public String makinStrings() {
         String s = �Fred�;
         s = s + �47�;
         s = s.substring(2, 5);
         s = s.toUpperCase();
         return s.toString();
    }How many objects are created when this method is called?
    My answer is 5
    1. "Fred"
    2. "47"
    3. "Fred47"
    4. "ed4"
    5. "ED4"
    But my friend is telling it is 3.
    1. "Fred"
    2. "47"
    3. "Fred47"
    I know that any method called on String object creates a brand new String. Please help me with the solution whether it is 3 or 5.

    hi,
    First of all i want to thanks for all of your replies.
    My friend is saying that when we say "How many objects when method is invoked" it means at runtime. String literals are not created at run time.
    String s = �Fred�; // No object is creatd here
    s = s + �47�; // One object created "s"
    s = s.substring(2, 5); //Another object "s"
    s = s.toUpperCase(); //Another object "s"
    return s.toString();
    Hence total 3 objects.
    Now the i have got a doubt. Are String literals created at Complie time itself. Or since String s = "Fred" is a compile time constant field. And String literal "47" is also a compile time constant field.
    Suppose if the code is like this
    String s = new String("Fred")
    String s1 = s; ---------------- Then is this String object created at Run time.
    String s2 = "47" ----------- This object is created at Complie time.
    Please clarify my doubt.

  • I need to know how many objects i got selected

    Hi all,
    I need to know how many objects i got selected for a particular issue and ussualy are too many to count one by one. I know that this information is provided in other software like Corel or Freehand, but I didn't find out how to get this info in Illustrator.
    Any idea?
    Thanks

    Open the Document Info palette.
    From its flyout menu, turn on Selection Only and Objects.
    The palette will not remember those settings. You have to re-select them every time you relaunch Illustrator.
    The Document Info palette is a half-baked hack, tagged-on to display a subset of the information in the normally-hidden programmer's window, instead of incorporating the data properly into the program's interface. So it's another completely unintuitive grab-bag of important information that everyone needs, but no one would expect to look for there.
    JET

  • How many WAYS are there to CREATE an OBJECT?

    I simply know about implicit creation and explicit creation:
    String name = "Asim Munir"; //Implicit
    String name = new String("Asim Munir"); // Explicit
    Do you have any other way to create an object?

    Hi,
    Basically in Java, an object is created by using the new keyword. This is the actual object creation. So far String is concerned, there is a trick what you have mentioned.
    Plz go through it.
    String str = "India"; It is also String object. But internally, Java maintains a String Constant pool to maintain the String object. When you are writing the above statement, it will first check the value "India" in the String Constant pool and it it does not find, then it will create an object. If it finds, it will not create but simply it maintain a reference to that "India" object. So here only one object is created. But in the following case.
    String str = new String("India");
    Here two objects are created. Just try to understand how two objects are created. If you have any problem, feel free to mail
    Debadatta Mishra
    [email protected]

  • How many computers are using my sync data

    I would like to know how many devices are utilizing my sync data.
    this seems like it should be in my sync management console online, but it is not.
    my paranoid brain sees a worst case scenario.. someone hacks my machine and somehow gets my sync key or was able to get a code generated to sync the data.
    is there a way to find out what devises are accessing my data ?
    thank you

    Unfortunately there's no easy way to do it, but there's a way to do it (and it's not obvious):
    Go to your Options/Preferences window and select the Sync tab.
    - From the "Manage account" drop-down, select "Reset Sync". (we are not going to Reset it...but is the way to go)
    - Select "Replace all other computers"
    - Press next and you will see the list of devices that are connected to the account.
    After that, close the window (unless you want to complete the process).
    I hope it helps.

  • How many Objects created??

    Hi Friends,
    I am really confused with this question,can someone please tell me how many objects would be created by the following code??My answer is two("java" on the heap and the normal new String() Object),am i right???
    public class Objects{  
    public static void main(String[] args)    {   
        String one = "Java";    
        String two = "Java";   
        String three = "J" + "a" + "v" + "a"; 
        String four = new String("Test");  
    }Thanks

    Probably not, since all the operands are string
    literals. The compiler probably sees that and instead
    generates the same bytecode that it would have if it
    had been coded as: "Java" in the first place. But
    again, still stupid and pointless.just what i wanted to say but was a bit slow. maybe it's stupid and pointless,
    but for grins, i am attaching the constants pool from the class file that was
    obtained by compiling the code in post 1 with Sun's compiler. I don't see any
    "J" or "a" or .........
    pool index: 1 type: 10 class index: 7 name index: 16 value: null
    pool index: 2 type: 8 class index: -1 name index: 17 value: null
    pool index: 3 type: 7 class index: -1 name index: 18 value: null
    pool index: 4 type: 8 class index: -1 name index: 19 value: null
    pool index: 5 type: 10 class index: 3 name index: 20 value: null
    pool index: 6 type: 7 class index: -1 name index: 21 value: null
    pool index: 7 type: 7 class index: -1 name index: 22 value: null
    pool index: 8 type: 1 class index: -1 name index: -1 value: <init>
    pool index: 9 type: 1 class index: -1 name index: -1 value: ()V
    pool index: 10 type: 1 class index: -1 name index: -1 value: Code
    pool index: 11 type: 1 class index: -1 name index: -1 value: LineNumberTable
    pool index: 12 type: 1 class index: -1 name index: -1 value: main
    pool index: 13 type: 1 class index: -1 name index: -1 value: ([Ljava/lang/String;)V
    pool index: 14 type: 1 class index: -1 name index: -1 value: SourceFile
    pool index: 15 type: 1 class index: -1 name index: -1 value: Objects.java
    pool index: 16 type: 12 class index: 9 name index: 8 value: null
    pool index: 17 type: 1 class index: -1 name index: -1 value: Java
    pool index: 18 type: 1 class index: -1 name index: -1 value: java/lang/String
    pool index: 19 type: 1 class index: -1 name index: -1 value: Test
    pool index: 20 type: 12 class index: 23 name index: 8 value: null
    pool index: 21 type: 1 class index: -1 name index: -1 value: Objects
    pool index: 22 type: 1 class index: -1 name index: -1 value: java/lang/Object
    pool index: 23 type: 1 class index: -1 name index: -1 value: (Ljava/lang/String;)Vwalker

  • How many users are working on EBS

    is it possible to find out how many users are currenlty at the same time working on EBS.
    Like how many payable users, mfg uers OTL users.

    Hi,
    Below sql will find how many users are currently working on EBS,
    SELECT distinct icx.session_id, icx.user_id, fu.user_name, fu.description
    FROM icx_sessions icx, fnd_user fu
    WHERE disabled_flag != 'Y'
    AND icx.pseudo_flag = 'N'
    AND ( last_connect + DECODE (fnd_profile.VALUE ('ICX_SESSION_TIMEOUT'),
    NULL, limit_time, 0, limit_time, fnd_profile.VALUE ('ICX_SESSION_TIMEOUT') / 60 ) / 24) > SYSDATE
    AND icx.counter < limit_connects
    AND icx.user_id = fu.user_id
    order by 4;
    Thanks,
    Amogh

  • How many books are approved a day - here are some stats

    Do you want to know why it is taking forever to get your iBook approved? Do you wonder how many books are actually approved per day? I was asking myself the same question and because Apple doesn't release any numbers, I monitored the numbers on the iBookstore recently to get an idea.
    Here are the numbers (just to get a rough idea, not scientifically proven)
    The iBookstore has finally a feature that lets you browse only iBooks (aka Multi-Touch Books). It displays the numbers of all available Paid and Free iBooks. That is what I was monitoring each morning.
    When I started to monitor the iBookstore on May15th it had a total of 3,217 iBooks. If you use January 19th as the start date, then Apple would have approved an average of 26 books a day.
    Now here is a table where I wrote down the number from the iBookstore each morning of that day. The two columns next to it show the difference (how many approved that day) and the total number of approved iBooks (paid and free)
    There are a few interesting conclusions you can draw from the numbers.
    * You see a drop over the weekend. Maybe that is proof that the department is located in the US and not in China or India.
    * The approval numbers fluctuate but the average is about twice as high as the 26 books from the original start. So they must have hired more staff (or reading faster)
    * Interesting that there was a big junk of free iBooks yanked off the bookstore
    Another unscientific info about the bestseller ranking from my own stats.
    With about 10 sales a day I land in the 30s rank.
    WIth about 2 sales a day it ranges from number 50-100
    Those numbers fluctuate wildly and I'm sure there are other factors (i.e. total sales) in that calculation.
    It would be interesting to hear numbers and experiences from other users.
    Edgar Rothermich
    DingDingMusic.com

    I looked up the number of book titles per category in Apple's and Amazon's bookstores yesterday:
    Category
    Amazon
    Apple
    Percent
    Professional & Technical
    107804
    360619
    26.98%
    26.98%
    Fiction & Literature
    20700
    227773
    17.04%
    44.02%
    Reference
    49942
    95433
    7.14%
    51.16%
    Business & Personal Finance
    78007
    76608
    5.73%
    56.89%
    Halth, Mind & Body
    63303
    4.74%
    61.63%
    History
    244585
    51904
    3.88%
    65.51%
    Religion & Spirituality
    123177
    49448
    3.70%
    69.21%
    Romance
    82851
    48581
    3.63%
    72.85%
    Children & Teens
    67825
    47718
    3.57%
    76.42%
    Nonfiction
    46908
    3.51%
    79.93%
    Mysteries & Thrillers
    64773
    41776
    3.13%
    83.05%
    Sci-Fi & Fantasy
    60828
    39861
    2.98%
    86.03%
    Arts & Entertainment
    71065
    37874
    2.83%
    88.87%
    Biographies & Memoirs
    60365
    33643
    2.52%
    91.38%
    Science & Nature
    87395
    27825
    2.08%
    93.47%
    Computers & Internet
    29770
    17558
    1.31%
    94.78%
    Politics & Current Events
    33551
    17461
    1.31%
    96.09%
    Travel & Adventure
    21181
    11874
    0.89%
    96.97%
    Cookbooks, Food & Wine
    8593
    0.64%
    97.62%
    Sports & Outdoors
    20909
    8443
    0.63%
    98.25%
    Lifestyle & Home
    73509
    8082
    0.60%
    98.85%
    Humor
    30506
    7265
    0.54%
    99.40%
    Comics & Graphic Novels
    4559
    0.34%
    99.74%
    Parenting
    27879
    3407
    0.25%
    99.99%
    Textbooks
    100
    0.01%
    100.00%
    1356622
    1336616
    These numbers are upper bounds, as book titles can be in up to three categories. So the real number of unique titles is probably closer to 1/3 or 1/2 of the 1.33 million, which is close to K T's 700,000 number.
    Amazon and Apple are similar in total number of titles (with a few different categories). I had expected there to be much less titles in the Apple bookstore compared to Amazon. So selection size isn't much of a differentiator anymore. That said, number of sales are still far higher in the Amazon store. Many early eBook adopters still prefer their Kindle over the iPad when looking for new eBooks.

  • 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.

Maybe you are looking for

  • Need example of the use of AQ Streams with JMS and no JNDI

    This question may be a stretch, but help me if you can. I do not have Oracle Internet Directory, but I do have 10g database and queues created. I would like to use plain JMS 1.1 wherever is that possible, but I understand that I will need to use Orac

  • CommandLink Disabled called multiple times

    Hello, I'm developing a brief method to enable/disable af:commandLink on certain condition. The layout is simple: a table to the left and a panelTabbed to the right. PanelTabbed has a partialTrigger to the table. In a visible tab there is a commandLi

  • A lot of images

    is there a way, to copy a part of an image? i would like to create another solitairemahjongg (this little japanese arcade-game with the stone-pyramid). there are 36 different tiles, using 36 single images wouldn't be very elegant. kind of a workaroun

  • Data repetition from Query

    Hi there, I have this query which joins two tables procedure get_monthly_cpl(p_cursor OUT rst_cur, searchcode IN VARCHAR2, in_date IN VARCHAR2) is begin open p_cursor for SELECT C1.CIPIDI_NR "Number", C1.CLAIMANT_NAME "Claimant Name", C1.CIPIDI_NAME

  • Is it possible to download adobe flash player on my iPhone 4S ? If it is, how do I get it ? Please thank you :)

    I am not sure how to get adobe flash player on my iPhone 4S help please