473,373 Members | 1,138 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,373 software developers and data experts.

getInt() in java

34
what getInt() do???

buffer.getInt()
Mar 26 '08 #1
14 11560
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

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

Similar topics

0
by: Mike Chirico | last post by:
I found the following interesting and wanted to pass it along Reference (TIP 12): http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download Connect and Select from Java //...
3
by: Hans-Dieter Franz | last post by:
Hello, I have a problem with a Java user-defined stored procedure and the "alter sequence" statement. I use DB2 8.1.2 and had the same problem with 8.1.0, but not with 7.*. I get the following...
13
by: Andrew Bell | last post by:
I'm doing a uni course in the UK and one of my semesters is about programming. This is just going to be compilied and executed with no menu just using command promt (javac classfile.class) I am...
3
by: MBReikowsky | last post by:
Ok this is homework, and I have wrestled with this for quite awhile now. My program is supposed to give an error message if the user enters any invalid entries. The program works great when the user...
12
by: bhanu08 | last post by:
I am get this error java.sql.SQLException: Data source name not found and no default driver specified my code for connection is { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");...
2
by: lunas | last post by:
hi i am trying to update a table selecting a value from another table and ve written the following codes for it.. import java.sql.*; import java.io.*; import java.util.*; public class...
21
madhoriya22
by: madhoriya22 | last post by:
Hi, Here is the query which I am using to get the values from the database:- "SELECT ?, COUNT(*) AS COUNT " + "FROM DEFECT_DETAIL " + "WHERE TARGET_MILESTONE = ? " + "GROUP BY ?"; ...
1
by: swethak | last post by:
hi, when i run a java program for to store data and retrive using mysql datatabse i got the following errors.I think in that one of error is due to set the class path.I placed my...
0
by: tangara | last post by:
Hi, I'm trying my very best to include Java Utilites bean inside my application but it is just not working. Hope the expert here can give me some advice. Thanks. My code for the package is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.