469,271 Members | 1,769 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

getInt() in java

34
what getInt() do???

buffer.getInt()
Mar 26 '08 #1
14 11219
r035198x
13,262 8TB
what getInt() do???

buffer.getInt()
Post all the relevant code using code tags. Also tell us what you think getInt() does.
Mar 26 '08 #2
pralu
34
i think getInt() returns 4 bytes ....n increment the position by 4 bytes in its buffer
Mar 26 '08 #3
r035198x
13,262 8TB
i think getInt() returns 4 bytes ....n increment the position by 4 bytes in its buffer
What is buffer?
Mar 26 '08 #4
pralu
34
What is buffer?
buffer is a temporary storage place
Mar 26 '08 #5
r035198x
13,262 8TB
buffer is a temporary storage place
So, are you going to post your code or not?
Mar 26 '08 #6
chaarmann
785 Expert 512MB
buffer is a temporary storage place
We know that already. But we need the class name of the object "buffer". So we can see what the method getInt(0) is doing.
For example "buffer" could be an object of class "ResultSet". Then it would return the integer value of the stored table column via JDBC.
Mar 26 '08 #7
pralu
34
So, are you going to post your code or not?

no i can't ..... m asking the function of getInt thats it.... what u have to do with the code, sir..........
Mar 26 '08 #8
r035198x
13,262 8TB
no i can't ..... m asking the function of getInt thats it.... what u have to do with the code, sir..........
Without the code, no one can tell what getInt does because the answer depends on which class getInt is in.
Example
Expand|Select|Wrap|Line Numbers
  1. class A {
  2.        public A() {
  3.        }
  4.         public String getInt() {
  5.               return "going around in circles";
  6.        }
  7. }
Now
Expand|Select|Wrap|Line Numbers
  1. A buffer = new A();
  2. System.out.println(buffer.getInt());
As you can see my getInt is very much different from your getInt().
Mar 26 '08 #9
JosAH
11,448 Expert 8TB
no i can't ..... m asking the function of getInt thats it.... what u have to do with the code, sir..........
Ok, if you're not going to tell us what the type (class) of 'buffer' is any guess is as
good as the other; my guess: toInt() first makes daemons fly out of your nose and
then Meryl Streep will hound you for the rest of your life while you turn purple and
your privvy parts will shrink beyond regular proportions while singing the Out of
Africa title song which makes the bytes in your computer laugh at you which in
turn will make Meryl Streep even angrier.

kind regards,

Jos
Mar 26 '08 #10
pralu
34
Ok, if you're not going to tell us what the type (class) of 'buffer' is any guess is as
good as the other; my guess: toInt() first makes daemons fly out of your nose and
then Meryl Streep will hound you for the rest of your life while you turn purple and
your privvy parts will shrink beyond regular proportions while singing the Out of
Africa title song which makes the bytes in your computer laugh at you which in
turn will make Meryl Streep even angrier.

kind regards,

Jos
nice answer jos..... but its something very critical which i cant....
ok i will give u that portion
Mar 26 '08 #11
sukatoa
539 512MB
no i can't ..... m asking the function of getInt thats it.... what u have to do with the code, sir..........
Where did you get that buffer.getInt()?

From the book? from your friend?from the office? from the internet? Where?

If you don't show the code, they don't show also the answer....

Maybe you are looking in this article,

If that is not,

maybe you are trying to be convinced.... and also trying to derive it to them...
And explains it all for you just like what my instructor are doing....

regards, ;-)
sukatoa
Mar 26 '08 #12
pralu
34
nice answer jos..... but its something very critical which i cant....
ok i will give u that portion



EventLogHeader header;
header.setNextIndex(buffer.getInt());

and in the above code EventLogHeader is the class and in that class they have mentioned it like this:


public int getNextIndex() { return (int)nextIndex; }
public void setNextIndex(int nextIndex) { this.nextIndex = (long)nextIndex & ClientData.MASK_U32; }
Mar 26 '08 #13
r035198x
13,262 8TB
EventLogHeader header;
header.setNextIndex(buffer.getInt());

and in the above code EventLogHeader is the class and in that class they have mentioned it like this:


public int getNextIndex() { return (int)nextIndex; }
public void setNextIndex(int nextIndex) { this.nextIndex = (long)nextIndex & ClientData.MASK_U32; }
That is not the relevant code. Where is buffer declared and initialized?
Mar 26 '08 #14
chaarmann
785 Expert 512MB
my guess: toInt() first makes daemons fly out of your nose and
then Meryl Streep will hound you for the rest of your life while you turn purple and
your privvy parts will shrink beyond regular proportions while singing the Out of
Africa title song which makes the bytes in your computer laugh at you which in
turn will make Meryl Streep even angrier.

kind regards,

Jos
Wow! That's awesome what your getInt() function is doing. Better than going around in circles. Can you send me the source code of this function over? I need to send it to a "friend". He once got very angry that I did a bad thing to him. I asked, what thing, and he said, somebody told him, but he doesn't want to repeat it, I should know by myself what I did. I askd him, who told you, and he said, he doesn't want to tell me the name of his informant, because he has promised him to keep his name secret. So he asked what will I do now? I told him I don't know of anything bad that I did to him, and he got angry and told me a liar, he can see the smirk in my face. I should at least be sorry and admit it.
So I said, whatever bad I have done to you, I feel sorry. That calmed him down, but I never figured out what it was.
Mar 26 '08 #15

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Mike Chirico | last post: by
3 posts views Thread by Hans-Dieter Franz | last post: by
13 posts views Thread by Andrew Bell | last post: by
madhoriya22
21 posts views Thread by madhoriya22 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.