 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- USB support for Java (Win32)Does anybody know any win32 usb library for java that I can use to
communicate with device. Application will communicate with device
using USB in the same way as RS232 - for control and management.
Thanks,
Dimitry
- 2
- VM -> secure Web Memory, Patent 863I'm releasing to Open Source an e-commerce local memory technique that
could reduce web congestion. A web-based operating system might be
possible. I am releasing this application also to Open Source.
To protect bandwidth for this technique, I applied for and received US
Patent 6,636,863 - the claims of this patent will be interesting to the
Open Source community.
Information:
http://209.87.142.42/webmemory/
Background:
* I originally published in June of 2000 on javaboutique
(http://javaboutique:internet.com/articles/shoppingcart/index.html) and
released the code for an e-commerce front end as Open Source.
* The article was mirrored on Linux Today
(http://linuxtoday.com/news/2000070200204OSSW).
* On Oct. 21, 2003, after a lengthy process including a quality review
by a number of patent examiners, I was granted US Patent 6,636,863
based on this work (to read the text, go to
http://patft.uspto.gov/netahtml/srchnum.htm and input the patent
number).
* Web Memory is secure, client-based, user-specific memory, based in
the JAVA VM present in computers, cell phones, Palm Pilots and chips.
It works in dotNET as well. The bandwidth for this technique has been
protected by patent. Is the method useful to the Open Source community?
Lane Friesen
e-mail: lanefriesen (at) hotmail.com
- 3
- Save gif file from the URLHello,
I just want to save on disc a gif file taken from the internet (i.e.
save as logo.gif the image
http://www.google.com/intl/us_ALL/images/logo.gif ). Is it possible
without much effort (I have read about the extra & not free libraries
but I hope there is a simple way to do so (just read bytes and write
bytes - no modification).
Regards. Marko
- 7
- Opinions on complexityI am thinking of developing a network application for my PhD, and it
involves (among other stuff) my own implementation of the TCP/IP
protocols. So, at the state the Java 1.5 version is, I need the use of
JNI for the RAW sockets. (Although the use of Java is not a MUST, I am
more experienced at it than I am at C/C++ or other useful programming
language.)
By now, I've managed to almost-implement the Ping: I send the
appropiate ICMP Echo Request to 127.0.0.1 (with its well-formed IP
header, ICMP header and data, based on the RFCs), but I still don't
"hear" the ICMP Echo Reply from my application, (although I can see
this ICMP Echo Reply going back when I capture the network traffic of
my loopback interface with Ethereal). But it's not the point of my
entry in this group to find a solution on this (it must be something
odd in the C native code I have to fix).
The thing is that, although I find this project feasible, I don't
really know how complex may it become (I am sure the TCP/IP stack is
not a trivial thing) and, unfortunately, I cannot spend as much time as
I would like on this (you sure know how it works: I've got a job from 8
to 17:30, which is not bad at all, but it doesn't let me too much spare
time).
So here goes my question: do you think it is a feasible project for
developing it on my own in a reasonable time?, do you recommend me
"opening" it on sourceforge or something like that, and share it with
other thinking heads?, are you one of those thinking heads :) ?.
Thanks in advance for your comments,
_Hobbes.
____________________________
"I must've put my finger on it." - Calvin
- 7
- Core Java ( JAVA 2.0), J2EE, XML, Swing,XSL Opening in Chennai 3+YearsHi All,
We are looking Software Engineer for my MNC Client in
chennai.. L&T info, HCL, Virtusa, EDS
Skill: Core Java ( JAVA 2.0), J2EE, XML, Swing,XSL
Exp 3 to 6 Years
Work Location: Chennai
>> SE, TL, PL openings
If you are looking for a good opening Please send the
resume to email***@***.com
Please send me the following information for a faster
Processing
Name:
Contact NO:
Cell:
Landline:
Current company:
Current Location:
Current Salary:
Expected Salary:
Notice Period with Present Employer:
Total IT Experience:
Relevant Experience:
Key Skills:
Domain Worked:
Are you willing to relocate to chennai
Regards
Latha HR Solutions
Chennai
- 7
- 7
- Paint methodI'm still new to Java, so this may be a pretty pathetic question.
Anyway, I have a paint method in an applet that paints something and
then when a certain button is pushed it needs to draw more (rectangles
and strings to be precise). However, the paint method is above, and
the scope of 'g' does not extend into the actionPerformed method. Can
'Graphics g' be declared outside the paint method, and if not is there
a way to make it work, while rewriting as little as possible?
- 7
- open source poker codeHi,
Bit of a long shot I imagine, but has anyone tried to use:
http://sourceforge.net/projects/pokersource/
They promise some sort of java wrapper in the readme, but all I have
found is c code.
I guess there's a chance to use JNI to call the c stuff but I suffer
from a very rare and extreme form of laziness that prevents this (and I
can't understand the code!).
cheers
Andy
- 7
- steganography using javaHi all,
I am actually new to this steganography thing.So I want to know if
there are any built-in methods and classes to handle stego in
Java.Also,I will very much appreciate if any of you have a sample code
or tutorial link.
Thanks all,
Anindya
- 9
- 13
- [Java-Printer]My printers are not senn by java appsThis problem apparently has nothing todo with Java applications : I am on
Linux and apparently now any Java apps run do not see my printer list as
handled by CUPS.
Before it worked ; I think it has to do with the JDK installed ?
Any ideas will be wellcome.
Thanks.
- 13
- 14
- 14
- JAVA RMI register problemHi
Im making aplication with Java RMI ... everything was working till
yesterday. Today i started to run server and i cant make it :( (once
per 20 times it works)
The way i registering serwer is (im doing this from the folder where i
have my server class and java files + stub ):
start rmiregistry
java -Djava.security.policy=test.policy serwer
Sometimes it works ,sometimes not,espescially when i m starting to run
second diffrent process(serwer)
i got this error:
D:\workspace\serwer2>rmiregistry
java.rmi.server.ExportException: Port already in use: 1099; nested
exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:
310)
at
sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218
)
at
sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
at
sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:19
0)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
at sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:322)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMI
DirectSocketFactory.java:27)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMI
MasterSocketFactory.java:333)
at
sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:64
9)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:
299)
... 7 more
D:\workspace\serwer2>java -Djava.security.policy=test2.policy server
Liczba aktywnych watkow: 1
nazwa watku: main
Usluga druga niezarejestrowana: RemoteException occurred in server
thread; neste
d exception is:
java.rmi.UnmarshalException: error unmarshalling arguments;
nested excep
tion is:
java.lang.ClassNotFoundException: server_Stub
I didnt change anything in my source code...nothing...it just started
doing like this. Lately i was able to run two server process...and
everything was ok.... i was looking for a tip in google...but nothing
help...anybody knows how to fix it?
Tnx .
- 15
- Got my Java console application finishedI finished my Java console application and it works
great in Windows and Linux. The problem right now is testing
it in Mac. I only have an old Mac Performa with OS8, and my Mac isn't reading
it right. Anyone know how to use a Java console program in pre-OSX Macs?
When I double click on the jar file it launches an editor now, does anyone know
how to launch it as a console application? I have the
Java Runtime Engine installed.
I believe want to associate the jar files with the Java Runtime Engine in
OS8...does anyone know how to do that with a Mac?
|
| Author |
Message |
Roedy Green

|
Posted: 2006-4-28 19:40:00 |
Top |
java-programmer, On Java and C++
On 28 Apr 2006 00:59:19 -0700, "al pacino" <email***@***.com>
wrote, quoted or indirectly quoted someone who said :
>improve your programming skills and what better tool to do that than
>using c++.
You might find the work of W. Edwards Deming interesting. He was the
man who taught the art of quality control to the Japanese.
He argues there is no point in exhorting people to be better. You
have to change the environment so they naturally and without
additional effort produce better results.
C++ allows well made programs but does little to insist on or even
encourage them. The beautiful quality remains a theoretical goal
rarely achieved. It is a bit like an impressive high wire act.
You can see the effect. If you look over C++ code you will see a huge
range of quality. If you look at Java code it is much more uniform.
The artisan in you yearns for the sporadic brilliance, but the manager
prefers the uniformity.
As a programmer you see the effect. In Java, a higher percentage of
trouble is caught at compile time. Once you have the compiler happy,
usually the code works. Because of the null pointer checks, enforced
initialisation and subscript checks, if a program works at all there
is a higher probability it is working correctly than the equivalent
C++ program. That means a poor programmer who writes buggy code has a
bigger safety net with Java to watch over him to catch these errors.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
| |
|
| |
 |
Roedy Green

|
Posted: 2006-4-28 19:40:00 |
Top |
java-programmer >> On Java and C++
On 28 Apr 2006 00:59:19 -0700, "al pacino" <email***@***.com>
wrote, quoted or indirectly quoted someone who said :
>improve your programming skills and what better tool to do that than
>using c++.
You might find the work of W. Edwards Deming interesting. He was the
man who taught the art of quality control to the Japanese.
He argues there is no point in exhorting people to be better. You
have to change the environment so they naturally and without
additional effort produce better results.
C++ allows well made programs but does little to insist on or even
encourage them. The beautiful quality remains a theoretical goal
rarely achieved. It is a bit like an impressive high wire act.
You can see the effect. If you look over C++ code you will see a huge
range of quality. If you look at Java code it is much more uniform.
The artisan in you yearns for the sporadic brilliance, but the manager
prefers the uniformity.
As a programmer you see the effect. In Java, a higher percentage of
trouble is caught at compile time. Once you have the compiler happy,
usually the code works. Because of the null pointer checks, enforced
initialisation and subscript checks, if a program works at all there
is a higher probability it is working correctly than the equivalent
C++ program. That means a poor programmer who writes buggy code has a
bigger safety net with Java to watch over him to catch these errors.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
| |
|
| |
 |
Oliver Wong

|
Posted: 2006-4-28 22:37:00 |
Top |
java-programmer >> On Java and C++
"Noah Roberts" <email***@***.com> wrote in message
news:email***@***.com...
>
> Roedy Green wrote:
>> On 27 Apr 2006 10:54:17 -0700, "Noah Roberts" <email***@***.com>
>> wrote, quoted or indirectly quoted someone who said :
>>
>> >Yes, but all the benefits you are listing are things you *can't* do and
>> >the things forced upon you. Where are the list of things you *can* do?
>> > You make Java sound like a jail sentance.
>>
>> Team coding and coding on your own are quite different experiences. I
>> presume you work mostly on your own. The conventions are very useful
>> to prevent bloodshed between team members. They are just accepted and
>> you get on with something more important to fight about.
>
> I don't see how your assertion applies to my quoted statement above.
> If you want to be understood I suggest you make your point more
> clearly.
I think Roedy is saying that when you work in a team, there are certain
things you can't do (e.g. ignore the conventions of the team). Java helps
you not do those things (by establishing a convention, as opposed to having
each team coming up with their own, so you have to relearn conventions when
switching teams). Or something along those lines.
>
> I also don't see how my quoted statement above would lead one to
> believe I have never worked in a team...but whatever. It is clear you
> don't have any good, and valid, arguments for you assertion that Java
> is better than C++. This is frankly not surprising to me as such
> assertions are always riddled with illogic and falacy.
I don't think Roedy asserted that "Java is better than C++". See
http://en.wikipedia.org/wiki/Psychological_projection
- Oliver
|
| |
|
| |
 |
Oliver Wong

|
Posted: 2006-4-28 22:40:00 |
Top |
java-programmer >> On Java and C++
"Noah Roberts" <email***@***.com> wrote in message
news:email***@***.com...
>
> I'm still looking for the can. You listed all the thing Java *can't*
> do but haven't come with anything it can. I don't see much advantage
> in *can't*.
That you can't shoot yourself in the foot (or at least not as easily as
in some other languages) seems like a big advantage to me.
- Oliver
|
| |
|
| |
 |
Noah Roberts

|
Posted: 2006-4-28 22:54:00 |
Top |
java-programmer >> On Java and C++
Oliver Wong wrote:
> See
> http://en.wikipedia.org/wiki/Psychological_projection
Ahhh yes, the last ditch attack from the weak. I grant you that it
appears to be a big gun as there is no way to argue against it...any
such attempt is of course also projecting. But only the unintelligent
cannot see it for what it is; I'll count you among them.
|
| |
|
| |
 |
Noah Roberts

|
Posted: 2006-4-28 22:59:00 |
Top |
java-programmer >> On Java and C++
Roedy Green wrote:
> However, I know C++ is not the best choice for many others. I know
> from first hand, rather than second hand experience. For a start,
> there is not even such an animal as a C++ Applet.
Holy crap, you people actually comming up with a can??!! Almost
anyway...I'll count it.
Took you long enough...damn!!!
> There is nothing
> comparable to rich set of GUARANTEED PRESENT class libraries.
Of course there is something comparable. The whole second half of the
C++ standard specifies the GUARANTEED PRESENT class (and other object
type) libraries.
> C++ is
> hopeless at platform-independent code.
Not even remotely true.
|
| |
|
| |
 |
The Ghost In The Machine

|
Posted: 2006-4-28 23:00:00 |
Top |
java-programmer >> On Java and C++
In comp.lang.java.advocacy, peter koch
<email***@***.com>
wrote
on 27 Apr 2006 14:51:39 -0700
<email***@***.com>:
>
> The Ghost In The Machine skrev:
>
> [snip]
>> "finally" is to RAII as manual transmission is to
>> automatic, from the looks of things.
>
> Not at all. RAII is to finally what a printing machine is to a pen.
> RAII simplifies a nontrivial and tedious task. Or do you always check
> for your objects being of the IDisposable type before deciding if you
> can leave their destruction to the garbage collector or if you will
> have to destroy them manually?
> If not - how will your program cope with classes that change?
> Also - how do you write generic code if you do not know if you will
> have to destroy your objects - except than by using run-time
> information?
How indeed? The best Java can do in that department is
a dispose() method (Swing) -- and that's not supported
in the language, unlike C++'s virtual destructor. finalize()
is overridable but it's never clear exactly when that will
be called.
[.sigsnip]
--
#191, email***@***.com
Windows Vista. Because it's time to refresh your hardware. Trust us.
|
| |
|
| |
 |
Chris Smith

|
Posted: 2006-4-28 23:10:00 |
Top |
java-programmer >> On Java and C++
Martin Vejn醨 <email***@***.com> wrote:
> Could you please give me equivalent Java code for this...
>
> // C++
> func()
> {
> class_with_possible_ressource cwpr, cwpr2;
> dosomethingwith(cwpr, cwpr2);
> }
>
> ...and for this?
>
> // C++
> func()
> {
> class_with_possible_ressource cwprs[1000];
> dosomethingwith(cwprs);
> }
No. :) I think you already know the answer. The latter would generally
be done by modifying the structure a bit. If there's really a need to
hold all those resources open at the same time, then some kind of
aggregate class could be written whose close method attempts to close
all of the resources in a collection.
--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
|
| |
|
| |
 |
Noah Roberts

|
Posted: 2006-4-28 23:10:00 |
Top |
java-programmer >> On Java and C++
Roedy Green wrote:
> On 27 Apr 2006 16:16:20 -0700, "Noah Roberts" <email***@***.com>
> wrote, quoted or indirectly quoted someone who said :
>
> >I also don't see how my quoted statement above would lead one to
> >believe I have never worked in a team...
>
> I would think anyone who had ever worked on a team was familiar with
> the ego battles that go on especially over how code should be
> formatted. You would have seen the necessity of deciding on project
> coding conventions to keep people from each others' throats.
>
> You made several comments of form "conventions are like a
> straightjacket", which indicated you had never experienced a situation
> where you needed them or where pre-existing conventions eased the
> tensions.
>
> You appeared to believe they had no value at all.
>
> You also sounded independent and argumentative, not the type of person
> who can stand working in a corporate team environment for very long.
> You have to bite your tongue till it bleeds.
This entire avenue of argument is not only riddled with ego and
argumentative remarks but it is also entirely beside the point even if
true.
|
| |
|
| |
 |
Mishagam

|
Posted: 2006-4-28 23:13:00 |
Top |
java-programmer >> On Java and C++
Mishagam wrote:
>>
>> OK. True, the D language has cleaned up old C inheritances C++ suffers
>> from. However, I doubt anyone would switch to D unless you provide a
>> large class library for almost everything. That's the only true
>> benefit of Java, the large std library.
>>
> Yes, large standard library helps. However Perl, Python, C# have
> something close.
> I would give additional benefits (for me).
> a) You don't have to think should you include fields of have variables
> as objects or references or pointers. It is decided for you usually
> close to optimal way (closest to references).
> b) You don't have to bother to use auto_pointer (not working with
> collections) or new delete or automatic destructor. It is decided for
> you to use something like auto_ptr but much better.
> c) You don't have to decide about programming style. Sun provided
> standard Java style.
> d) You don't have to decide about naming of files and classes - they are
> the same.
> e) Logical package directory structure is forced on you.
> f) You don't have to choose between char *, string, CString ... - String
> is better (or same) than either of them and it is only choice.
> g) you don't have to choose between long int, unsigned int, WORD, DWORD,
> size_t .... - close to optimal choice if forced on you.
> h) You don't decide do you use internal or external functions
> definitions, or do you use macro. - close to optimal choice if only one
> possible.
> i) You don't have to decide if you use methods or define new operators.
> Java choice is sometimes more verbose, but usually more clear.
> ...
> As you can guess, I can continue.
> Dropping all these choices first - makes programming easier, you have
> less things to bother about, second - makes language smaller and more
> easy to understand. Of course such approach could lead to very bad
> language - but Java luckily has good design. And I thing C++ standard
> committee just made bad design - introducing complexities which doesn't
> add enough benefits to justify them.
And of course one of main items:
j: In Java you generally don't have to think how to report error - you
throw Exception. In C++ you have different conventions for different
systems changing over time. Some programs return NULL or 0 or -1 or
SIGNALS ..., Microsoft COM programs returned HRESULT, lately C++ started
using exceptions, but I am sure it is still only one of choices. I don't
know, but doubt that C++ exceptions are as convenient as in Java. Of
course this result of Java being designed later when exceptions already
were well known .
|
| |
|
| |
 |
Mishagam

|
Posted: 2006-4-28 23:20:00 |
Top |
java-programmer >> On Java and C++
peter koch wrote:
> Roedy Green wrote:
>> However, I know C++ is not the best choice for many others. I know
>> from first hand, rather than second hand experience. For a start,
>> there is not even such an animal as a C++ Applet. There is nothing
>> comparable to rich set of GUARANTEED PRESENT class libraries. C++ is
>> hopeless at platform-independent code.
> I do agree that Java probably should be used for client side web-based
> programming.
> That said there is ATL which COM which is used extensively in those
> area - resulting in platform dependent code, of course.
>
> /Peter
If you are talking about IE ActiveX controls they were also responsible
for a lot of security breaches (I am not expert here), because C++ and
specifically ActiveX controls don't have Java Applets inherent security.
|
| |
|
| |
 |
Timo Stamm

|
Posted: 2006-4-28 23:23:00 |
Top |
java-programmer >> On Java and C++
Noah Roberts schrieb:
> Oliver Wong wrote:
>> See
>> http://en.wikipedia.org/wiki/Psychological_projection
>
> Ahhh yes, the last ditch attack from the weak.
You are the only one who takes this discussion for a battle. Oliver
didn't attack you, he just tried to help you realizing what is going on.
Timo
|
| |
|
| |
 |
Oliver Wong

|
Posted: 2006-4-28 23:23:00 |
Top |
java-programmer >> On Java and C++
"Alf P. Steinbach" <email***@***.com> wrote in message
news:email***@***.com...
>* Roedy Green:
>> On Fri, 28 Apr 2006 01:19:40 +0200, "Alf P. Steinbach"
>> <email***@***.com> wrote, quoted or indirectly quoted someone who said :
>>
>>> Apart from the lack of connection from premise to conclusion, that's not
>>> a fact, it's an excuse for sloppiness.
>>
>> In java, memory leaks and packratting are quite different problems and
>> require quite different tools to detect them and quite different
>> solutions.
>
> Exactly how can the memory leak that cannot exist, be detected and require
> a different solution?
If Roedy had written "require quite different sets of tools and quite
different sets of solutions", would that have been better? Then you could
say that for problems which do not exist, the appropriate sets are the empty
sets.
Obviously, if one problem can occur, and another problem cannot occur,
then they must be different problems, which I believe was Roedy's main
point, even if he failed to express it properly.
>
>> If you wished, you could make the same distinction in C++, but you
>> don't because the distinction does not matter so much for C++.
>
> On the contrary, in C++ it's meaningful to talk about different kinds of
> memory leaks, such as when there's still a reference somewhere, what you
> call a "packrat", and when there's no reference anywhere. If the case of
> no reference couldn't exist, as in Java, then it would be meaningless to
> distinguish it. That distinction is meaningless for Java.
(Ditto as above, I think what Roedy meant is clear, though he may have
not have expressed it in a way that you wanted).
>> there is no way on earth you will convince us that C++ memory
>> allocation is easier and more fool proof, especially when you don't
>> even claim to know Java.
>
> I have not made the claims you assert. I don't believe that you talk on
> behalf of "us", as you imply.
Maybe this is a psychological phenomena, but when I read "us", I had
assumed he was referring to "Java folks" (perhaps because I am one of those
Java folks). I think there's a lot of emotional energy here which may cause
us to say things we wish we hadn't (where we here is both Java folks and C++
folks). There's too much of an us-versus-them mentality going on, and it's
very easy for a Java person, posting from a Java newsgroup, to see an
unfamiliar name, and think "must be some C++ fanatic" and vice versa.
> Perversely, I hope you're trolling.
If you go through the Google archives of comp.lang.java.programmer,
you'll see Roedy has a pretty good track record of being a helpful
contributor to the Java community. I don't suspect him of trolling. Rather,
I suspect these kind of threads bring out the worst in us.
- Oliver
|
| |
|
| |
 |
Noah Roberts

|
Posted: 2006-4-28 23:29:00 |
Top |
java-programmer >> On Java and C++
Roedy Green wrote:
> On 27 Apr 2006 10:59:36 -0700, "Noah Roberts" <email***@***.com>
> wrote, quoted or indirectly quoted someone who said :
> The big advantage of the Java approach is it FORCES you to write
> cleaner code.
> Your name Noah, suggests you might be the son of fundamentalist
> parents. Fundamentalists are people who are utterly convinced their
> faith is the one true faith, and guarantee they never change their
> opinion by scrupulously avoiding studying any others.
Another totally unrelated ad hominem. You are obviously a very stupid
person. I base this on your method of argument, your inability to
argue effectively, your inability to comprehend simple statements, and
your overwhelming supply of idiotic assumptions that have nothing,
whatsoever, to do with the purported evidence.
...there is ample evidence in your own statements to support that you
are in fact an idiot.
Interesting set in this last post of yours though...bring up Java's
nature to force you into doing something the way a set of people
decided where best and then call ME a fundamentalist - you have no
evidence to support that statement except the fact that there was a
famous and important Hebrew that shared my namesake but your own
statements lend some support to the argument that in fact you are very
likely a fundamentalist as well as a facist.
Irony can be a facinating thing.
Yes, this is also a personal attack having nothing to do with the
topic, however, instead of grasping at staws in an attempt to discredit
you based on assumed ansestry and upbringing I am simply pointing out
the fact that you already discredited yourself through your own words
and methods.
You loose, no question about it. Of course this has no bearing on the
usefulness of the Java language...it only means you are a piss poor
advocate of it and not a particularly intelligent or nice person.
|
| |
|
| |
 |
Noah Roberts

|
Posted: 2006-4-28 23:38:00 |
Top |
java-programmer >> On Java and C++
Oliver Wong wrote:
> "Alf P. Steinbach" <email***@***.com> wrote in message
> news:email***@***.com...
> >* Roedy Green:
> >> On Fri, 28 Apr 2006 01:19:40 +0200, "Alf P. Steinbach"
> >> <email***@***.com> wrote, quoted or indirectly quoted someone who said :
> >>
> >>> Apart from the lack of connection from premise to conclusion, that's not
> >>> a fact, it's an excuse for sloppiness.
> >>
> >> In java, memory leaks and packratting are quite different problems and
> >> require quite different tools to detect them and quite different
> >> solutions.
> >
> > Exactly how can the memory leak that cannot exist, be detected and require
> > a different solution?
>
> If Roedy had written "require quite different sets of tools and quite
> different sets of solutions", would that have been better? Then you could
> say that for problems which do not exist, the appropriate sets are the empty
> sets.
>
> Obviously, if one problem can occur, and another problem cannot occur,
> then they must be different problems, which I believe was Roedy's main
> point, even if he failed to express it properly.
That is really grasping at straws. Using set theory to weed out a
meaning you like from a the rewording of a statement. If we were in
the middle of an argument about abstract math then maybe it would have
its place...but we are not.
|
| |
|
| |
 |
Oliver Wong

|
Posted: 2006-4-28 23:45:00 |
Top |
java-programmer >> On Java and C++
"peter koch" <email***@***.com> wrote in message
news:email***@***.com...
Very interesting post, Koch. I've snipped the parts I've agreed with, and am
only including some concerns I have about C++ and clarifications on Java.
>
> I do not
> understand why each class MUST have its own file (unless you make that
> class a secondary citizen).
Actually, only the top level public classes should be in their own
files. Private classes, or nested classes, can be within any file. I suspect
the reason why is primarily a pragmatic one: So that the classloader can
easily locate the file that contains the bytecode for the classes and load
them.
It has some nice side effects. When I'm given someone else's code base,
and I have a qualified class name, I always immediately know the full path
to the source code file. I don't even have to browse a directory listing or
anything like that.
>
> There are three kinds of lies. Lies, statistics and benchmarks.... or
> so I've heard. The nice thing about C++ strings is that the number of
> characters in a string is a O(1) operation. In Java, you would have to
> check the number of surrogates making it a O(n) operation. Also C++
> strings are more powerful than Java strings. All in all I believe I'd
> prefer using C++ strings, switching to some specialised class in the
> unlikely case string-handling did turn up to take a significand part of
> my programs execution time.
I'm surprised unicode-stuff would appear as an advantage of C++ over
Java. I won't dispute this, since I don't know enough about the state of C++
libraries, but I was under the impression that the lowest common denominator
for C++ was ASCII, while the lowest common denominator for Java was the BMP
(Basic Multilingual Plane) portion of unicode.
I can't speak for others (e.g. archeologists, etc.), but I've never used
characters characters outside the BMP. For example, while I am interested in
writing text in English, French and Japanese, I am not interested in writing
in cuneiform, cypriot, or byzantinne musical notation. So I've never had a
problem with text in Java applications.
However, I have had problems with C++ applications which assumed ASCII.
WinAmp is one example. It has trouble handling the ID3 tags of my Japanese
songs. iTunes seems a bit better at this. *SOMETIMES* it properly renders
the kanji characters, but other times the track name will show up as a bunch
of question marks.
So I was under the impression that C++ support for unicode was behind
Java, not ahead of it. I guess times have changed.
> Javas type system is not freedom but rather a jail. It has prevented
> porting of Java to several platforms, it gives cumbersome Unicode
> support and it forces Java to stick with inefficient 32-bit integers in
> a world that is soon turning to 64 bits.
In its defense, I think the fact that the size of Java's primitive
datatypes remains constant is a "good thing". If an when you want to use a
64 bit datatype, you'd simply use "long" instead of "int". And I don't think
there's any technical reason why, in a few years from now, if 128 bit were
desired, a new datatype couldn't be added to Java to support that, without
breaking any previous code (except possibly via the addition of a new
keyword, which could no longer be used as a variable or method name).
The company I work at, Castor Technologies, makes some money by porting
C code from 32 bit platforms to 64 bit platforms. The fact that we're making
money must mean it's too painful for our clients to do the migration
themselves. I don't know if this C situation applies to C++ as well.
- Oliver
|
| |
|
| |
 |
Noah Roberts

|
Posted: 2006-4-28 23:49:00 |
Top |
java-programmer >> On Java and C++
Mishagam wrote:
> peter koch wrote:
> > Roedy Green wrote:
> >> However, I know C++ is not the best choice for many others. I know
> >> from first hand, rather than second hand experience. For a start,
> >> there is not even such an animal as a C++ Applet. There is nothing
> >> comparable to rich set of GUARANTEED PRESENT class libraries. C++ is
> >> hopeless at platform-independent code.
> > I do agree that Java probably should be used for client side web-based
> > programming.
> > That said there is ATL which COM which is used extensively in those
> > area - resulting in platform dependent code, of course.
> >
> > /Peter
> If you are talking about IE ActiveX controls they were also responsible
> for a lot of security breaches (I am not expert here), because C++ and
> specifically ActiveX controls don't have Java Applets inherent security.
Yes, Applets have to be given to Java as something it can do that
current incarnations of C++ cannot. I do not know that this is
inherent to the language or more because of the way Java is normally
processed.
Also it must be mentioned that flash is also used quite a bit in this
area and in fact, in my opinion at least, results in better output.
Flash "applets" seem to work better on more platforms than Java. Hell,
at home where I use Linux I will use Flash but won't even bother with
installing the Java plugins because much of the time the applets just
don't function well.
However, flash is much more expensive for the devolper, who doesn't
even have to pay for the JDK but has to pay a fortune for flash. When
I write applets it is with Java, not Flash and certainly not C++. But
when I write cross-platform code that won't be running in a browser
most of the time I use C++, not Flash, and not Java (though sometimes I
think about that as an alternative).
|
| |
|
| |
 |
Oliver Wong

|
Posted: 2006-4-28 23:53:00 |
Top |
java-programmer >> On Java and C++
"Noah Roberts" <email***@***.com> wrote in message
news:email***@***.com...
>
> Oliver Wong wrote:
>> See
>> http://en.wikipedia.org/wiki/Psychological_projection
>
> Ahhh yes, the last ditch attack from the weak. I grant you that it
> appears to be a big gun as there is no way to argue against it...any
> such attempt is of course also projecting. But only the unintelligent
> cannot see it for what it is; I'll count you among them.
>
Taken in context, you wrote:
<quote>
It is clear you
don't have any good, and valid, arguments for you assertion that Java
is better than C++.
</quote>
and I wrote
<quote>
I don't think Roedy asserted that "Java is better than C++". See
http://en.wikipedia.org/wiki/Psychological_projection
</quote>
Assuming that I am correct in thinking that Roedy did not make the
assertion you claim he made, what would you call your behaviour, if not
psychological projection?
Alternatively, perhaps he DID make that assertion somewhere, and I had
forgotten about it, or perhaps that particular message never arrived at my
newsgroup server. If so, I apologize for any offense I may have caused you
by suggesting that you might have been projecting.
I don't mind if you think I'm "weak" or "unintelligent". My goal wasn't
to earn your praise, but rather to point out a possible source of the
apparent disagrement you're having with Roedy.
- Oliver
|
| |
|
| |
 |
Noah Roberts

|
Posted: 2006-4-28 23:54:00 |
Top |
java-programmer >> On Java and C++
Luc The Perverse wrote:
> You can't use 6th grade rhetoric to try to convince a group of people who
> have been using Java for years that suddenly it "sucks" because you say so.
Quote me saying that.
Simple request...
You won't...because you can't...because I never said it.
Come back when you can understand.
|
| |
|
| |
 |
Mishagam

|
Posted: 2006-4-28 23:57:00 |
Top |
java-programmer >> On Java and C++
The Ghost In The Machine wrote:
> In comp.lang.java.advocacy, peter koch
>> Not at all. RAII is to finally what a printing machine is to a pen.
>> RAII simplifies a nontrivial and tedious task. Or do you always check
>> for your objects being of the IDisposable type before deciding if you
>> can leave their destruction to the garbage collector or if you will
>> have to destroy them manually?
>> If not - how will your program cope with classes that change?
>> Also - how do you write generic code if you do not know if you will
>> have to destroy your objects - except than by using run-time
>> information?
>
> How indeed? The best Java can do in that department is
> a dispose() method (Swing) -- and that's not supported
> in the language, unlike C++'s virtual destructor. finalize()
> is overridable but it's never clear exactly when that will
> be called.
I understand that RAII is basically use automatically called
destructor's to dispose resources? I agree it is useful where it can be
used.
It works if you work with objects as values, it doesn't work if you work
with pointers or references. In such cases destructor can easily leave
dangling pointer. If you work with references you are on your own, or
have to duplicate something like reference counting or Java GC. I don't
think you can work without using references in big program.
I think because of this STL mostly works (in examples) with value
elements, and this creates a lot of problems - you cannot place
descended class objects were you can place base objects, you have to
deal with constructors, destructor's, copy constructors called in
strange places, you waste memory and so on. Also, you have to have
different generated code for different objects and use templates. And in
Java one Collections library works OK with any object.
|
| |
|
| |
 |
Mishagam

|
Posted: 2006-4-29 0:00:00 |
Top |
java-programmer >> On Java and C++
peter koch wrote:
> I agree here. Readability matters a lot. And here C++ is a clear
> winner, due to its more advanced features such as templates, operator
> overloading and RAII,
You are joking, Right?
|
| |
|
| |
 |
Noah Roberts

|
Posted: 2006-4-29 0:01:00 |
Top |
java-programmer >> On Java and C++
Bent C Dalager wrote:
> In article <email***@***.com>,
> Noah Roberts <email***@***.com> wrote:
> >
> >I know all about that. Point is that it was asserted that C++ is not
> >as good as Java because Java binary code will run on some processors
> >but C++ source code won't.
>
> That is an assertion that may exist inside your head, but you will not
> actually find it in this thread.
Really? I guess you never said the following then:
"Interestingly, of course, while there are no CPUs that support C++
instructions natively (that I know of anyway), there are those that
support Java bytecode natively. The conclusion being that while it is
possible to have a pure Java system, it is not possible to have a pure
C++ system :-) "
Now, that statement can only be talking about C++ source code as all
other forms of C++ come in the form of binary codes meant for execution
by a CPU or in the intermediate object form, also composed primarily of
CPU instructions but without enough total information to be a true
executable...sort like pulling a Java .class file out of its package
and trying to run it.
At any rate, no matter how you slice it...the comparison is purposfully
scewed, being a compiled form on one hand and something other than a
complete compilation on the other...it's a red herring, and not a very
good one.
|
| |
|
| |
 |
Roedy Green

|
Posted: 2006-4-29 0:05:00 |
Top |
java-programmer >> On Java and C++
On 28 Apr 2006 08:37:45 -0700, "Noah Roberts" <email***@***.com>
wrote, quoted or indirectly quoted someone who said :
>
>That is really grasping at straws. Using set theory to weed out a
>meaning you like from a the rewording of a statement. If we were in
>the middle of an argument about abstract math then maybe it would have
>its place...but we are not.
You are not a programmer at heart. You would make a better lawyer.
They get paid to deliberately misinterpret.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Is it possible to design Audio CD player by using Java only?Never tried it myself, but have you looked at java media api. i am thinking
if reading file from the cd in a normal way (binary stream) and then
feeding it to media api can do the job....!!!
Good luck anyways :-)
"MiLF" <email***@***.com> wrote in message
news:bdesn5$rki$email***@***.com...
> I am not expecting how fancy the CD player will be, but basic function is
> enough.
>
>
- 2
- Storing and parsing variable length stringsHi folks...
I have an application which needs to store variable-length strings (up
to 24 characters long) that must then be matched according to prefix.
That is, whenever a prefix is given, the application has to be able to
retrieve all stored strings that start with this prefix. Conversely,
the program has to be able to store strings in such a way, so that
prefix-based retrieving is fast and accurate (i.e., all relative
strings are located and retrieved). Doing this linearly is obviously
slow and inefficient.
So, what is the best way of implementing this functionality in J2SE 1.4
or later? Or, if there is no ready (preprogrammed) way of doing it
properly in the standard distribution, are you aware of any open source
implementation (e.g., tree or something similar)?
Thanks,
Dimitris
- 3
- Non Asian Whore Mature Mummy Just few link on some movies...
All just for you...
Download
>>>>> http://download-video.12w.net
>>>>> http://world-sex.urllogs.com
>>>>> http://video-sex.12w.net
CLICK FREE DOWNLOAD VIDEO PORN...
L
I
C
K
T
O
W
A
T
C
H
V
I
D
E
O
P
O
R
N
D
O
W
N
L
O
A
D
F
R
E
E
.
.
.
W
E
L
C
O
M
T
O
M
O
V
I
E
S
P
O
R
N
D
O
W
N
L
O
A
D
.
.
.
- 4
- How to compute a regex match against an object's parameter by name?Consider that you want to do a regex match on the contents of an
attribute of that object. Say, for example, the contents of:
SomeObjectInstance.x
All is well unless you don't know ahead of time that "x" is the
attribute that the user will search against. Suppose that the object
can have any attribute name, and even all those possibilities aren't
known at compile time. The user can/will select this attribute, as well
as the regex pattern.
So the trick is how to apply the match against "x" in this case with
only "x" as a string passed to the method?
// this doesn't work!
public boolean isRegexMatch(String p, String m, SomeObject o, String
attribute){
Pattern pat = Pattern.compile(p);
Matcher mat = pat.matcher(o."attribute"); <--- doesn't work, obviously
return (mat.find());
}
The above would be nice, but as expected-it doesn't work.
So the question is, how to make the method functional without knowing
what it will be passed for "attribute"?
TIA!
BogusException
- 5
- JBoss 3.2.2 security
Hello,
I'm developing EJB based system on JBoss. The system consists of
two parts: the set of EJB's, mainly Entity Beans which are interfaces
to DB and servlet which is used as user interface. As the interface to
entity beans i'm using statefull session bean. Every call from servlet
have to pass throught it.
To authenticate users I'm using DatabaseServerLoginModule. Users are
able to login, but then they try again to execute eny method from
session bean the server throws exception
Authentication exception, principal=null
What am i doing wrong ?? Should I store the users principal or
it is stored in session context ?
Cheers,
--
Marcin Krasowski mkrasowski (at) zagiel (dot) com (dot) pl
To iterate is human, to recurse divine.
L. Peter Deutsch
- 6
- J2ME interview questionshey all,
i am wondering if u ca give me j2me interview questions link or u can
advice me regarding that.
Thanks!
- 7
- One class in several filesHello
Is possible make one class in several files ?
I would like do this for organization reason.
Thanks in advice
GG
- 8
- Seaching word in text file using JAVA.Hello,
I have a problem on seaching word in text file using JAVA.
Below are the sample code i have written for searching word honda,
1990 and imran.I also want to save word honda in static string name
classtring. For first line i use this java code to save word honda in
classtring and its working well. I have a problem to save second line
1990 and imran.
The technique i use is searching until "=" and save word after "=".Can
anyone give the idea and java code.
Thank you...
------------java code ------------------
content = f.readLine();
// find class name
StringTokenizer s = new StringTokenizer (content,"=");
while (s.hasMoreTokens())
{
String string_val = s.nextToken();
if (string_val.trim().equals("classname".trim()))
{
classString=s.nextToken();
}
}
------- data text file -------------
name_car = honda
year = 1990
owner = imran
- 9
- java & CGII am a programming student attempting a quoting system (similar to what
geico does) for my job. I've written a program that is executable from
the command prompt that returns the expected values, but I need it to
work with a webpage.
I want the user to be able to input data, the program process it, and
then display the results. I've found code that uses "POST" to get the
data to a program, but how does the program process it and how do I get
it back into another web page? I've searched the web but I'm having
difficulty finding answers.
Thanks in advance to anyone who can help.
- 10
- how to get the content from an URL?Hi people,
I have write some code that outputs the content of an URL in
System.out,
which is really trivial using the following code:
URL url=new URL("http://www.some-url.com");
URLConnection c=url.openConnection();
BufferedReader is=new BufferedReader(new
InputStreamReader(c.getInputStream()));
String line;
while ((line=is.readLine())!=null) {
System.out.println("line: "+line);
}
But, some URLs have javascript code embedded that redirects the page
or refills
it in some way when it's automatically run by the browser. I want to
have the HTML code after executing that javascript code, exactly as
you can get it from your internet browser's "view source-code", not as
I'am getting it by now.
The cuestion is...
there is ANY workaround to this issue? some way to run javascripted
pages from
java? some way to deliver it to a web browser, or something nicer?
thanks to everyone,
hernan rancati, cesare.
- 11
- Capture keystrokeHi,
I have a command line java program and I am trying to capture a keypress
from the user to say pause or stop the program. The only way I can get
this to work at the moment is to read in a key but the program waits for
the user to press return. I don't want this. I want to read the keypress
asynchronously without the user hitting return.
Anybody give me some pointers to how to do this?
Thanks in advance
Brian
- 12
- problems with TCPMONHi,
I'm using axis 1.2-RC3 and eclipse 3.01RC. When i run tcpmon from
command line
>java -cp org.apache.axis.utils.tcpmon
i use the panel for setting me as listener on port 8083 while tomcat is
on port 8080.
The problem is that when the client comunicate with server i dont have
2 SOAP messages but the tcpmon loops infinite on an error message.
I cant post you the output because tcpmon goes in infinite loop and its
impossible to copy text.
However i have set the axis path appropriately and i have added it to
classpath and classpath to path so i can call tcpmon with java org.....
I have also the needed jars (expecially) axis.jar included in axis
server (on tomcat) and imported in eclipse project.
Thank you in advance!
- 13
- doubtsin javaHelloo
I am a newer one to java. just started to study it. I am getting so
many doubts in the language. I don have any previous knowledge in
progamming.
I would like to know more about JAVA and its applications in the real
world.
Where can I find jobs after studyig it??? From where will I get
practice programs in it???
Thanks in advance
Deepa
- 14
- Java Applet in Mac FireFox sets multiple DIFFERENT cookiesI've been fighting with this one for a couple days. I'm getting two
(different) cookie headers being set.
Quick Background:
- Using a TurboGears web application.
- Embedding an Applet to assist in file uploads (JUpload).
- Applet uploads the files and sends the data to a secure URL.
- A session ID preserves the user's login information so they don't
get a 403 or have to login again.
- Works totally fine in everything EXCEPT FireFox on a Mac (Safari
works fine, as well as FireFox in Windows)
Using Ethereal to look at the HTTP header, there are two "Cookies"
values being set. The one that I set, and some other random one which
I have NO idea where it is coming from. As follows:
POST /import/upload HTTP/1.1
Cookies: tg-visit=2k842fgj237dfkvh232c32hdh3832
Content-length: 123541
<blah blah blah other headers>
Cookies: tg-visit=743jk82hfg94520fng62j8233jfg826
The first tg-visit value (the session id) is correct. The second one
which is the last header being set, is some other id being set. In
Safari the tg-visit value is the same on both lines and it works fine.
Other browsers properly only sets a single line. Firefox on a Mac
gives me two different values, and I have NO idea why.
Code to follow:
<APPLET CODE="foo.bar.myApplet" ARCHIVE="/static/myApplet.jar"
WIDTH="450" HEIGHT="320">');
<PARAM name="type" value="application/x-java-applet;version=1.4" /
>');
<PARAM name="scriptable" value="true" />
<PARAM name="postURL" value="${postUrl}" />
<PARAM name="redirectURL" value="${redirectUrl}" />
<PARAM name="tgVisitValue" value="tg-visit=${tgVisitValue}" />
</APPLET>
I have also tried to use the MAYSCRIPT attribute, but that doesn't
really help.
Using TurboGears which fills in the ${tgVisitValue} properly (which
works fine).
myApplet.java
this.mycookies = this.getParameter("tgVisitValue",
DEFAULT_COOKIE_STRING);
if (this.mycookies == DEFAULT_COOKIE_STRING) {
try
{
JSObject window = JSObject.getWindow(this );
JSObject document =
(JSObject)window.getMember( "document" );
String cookies =
(String)window.eval("self.document.cookie");
if (cookies.equals("undefined")) // we're IE
cookies = (String)document.getMember("cookie");
// NAOMI
// get all the unexpired cookies
// this.mycookies = (String) document.getMember( "cookie" );
}
catch ( Exception e )
{
this.mycookies = "nocookie=0";
}
}
This grabs the cookie value properly, so I don't think there are any
problems there. The code that does all the HTTP magic is here:
try{
String boundary = "-----------------------------" +
getRandomString();
url = new URL(uploadURL);
// Setting up the connection for upload.
urlConn = url.openConnection();
urlConn.setRequestProperty("Cookie", this.mycookies);
urlConn.setDoInput (true);
urlConn.setDoOutput (true);
urlConn.setUseCaches (false);
urlConn.setRequestProperty("Content-length", ""+totalFilesLength);
urlConn.setRequestProperty("Content-Type",
"multipart/form-data; boundary=" +
boundary.substring(2,
boundary.length()));
String CRLF = "\r\n";
urlConn.connect();
// Retrieve OutputStream For upload (Post).
dOut = new DataOutputStream(urlConn.getOutputStream());
// Actual Uploading part.
StringBuffer sb;
File f;
uploadedLength = 0;
for(int i=0; i < aTotalFiles.length && !stop; i++){
f = aTotalFiles[i];
sb = new StringBuffer();
// Line 1.
sb.append(boundary);sb.append(CRLF);
// Line 2.
sb.append("Content-Disposition: form-data; name=
\"File");sb.append(i);
sb.append("\"; filename=\"");sb.append(f.toString());
sb.append("\"");sb.append(CRLF);
// Line 3 & Empty Line 4.
sb.append("Content-Type: application/octet-stream");
sb.append("Content-Length: " + f.length());
sb.append(CRLF);sb.append(CRLF);
dOut.writeBytes(sb.toString());
uploadFileStream(f,dOut);
dOut.writeBytes(CRLF);
}
// Telling the Server we have Finished.
dOut.writeBytes(boundary);
dOut.writeBytes("--");
dOut.writeBytes(CRLF);
dOut.flush ();
if(!stop) progress.setString("File(s) uploaded. Wait for server
response!");
bInp = new BufferedReader(new
InputStreamReader(urlConn.getInputStream ()));
Any ideas?
- 15
- Reading an array of byte with special delimiter....help me!!Hi guys,
i've developed a java application that has in input a txt file with a
standard format
string string string
string double double
string double double
and stores it into an array of byte with a fixed format,
that is
byte(whitespace)byte(whitespace)byte(;)byte(whitespace)byte(whitespace)byte(;)byte(whitespace)byte(whitespace)byte(;)
that mean introducing byte whitespace value and byte ; value to
separate different columns and different rows.
Now i have to develop inverse routine,that has to read the array of
byte and rebuild its original format.
Can you help me with some idea ord code?
I'm inexepert...please help me with clear suggest...
I post you my routine that converts txt file into an array of byte
P.S.In my txt file number of columns and rows change for each file,what
is standard is a firtst headline that is an array of string and others
row with the same format string array of doubles....
[code]public byte[] getBytes(){
byte middlerow=' ';
byte endrow=';';
Vector temp=new Vector(10000000);
int i=0;
String g=null;
Riga r;
Double val[];
while(i<intest.length){
//copio tutto nell'array di byte
byte []bytes = intest[i].getBytes();
// memorizza in byte un elemento del vettore alla volta
for( Byte aByte : bytes ) {
temp.addElement( aByte );
}
temp.addElement( Byte.valueOf( middlerow ) );
i++;
}
temp.addElement(Byte.valueOf(endrow));
System.out.println("Intestazione convertita in byte");
for(int l=0;l<rows.size()-1;l++){
r=(Riga)rows.get(l);
g=r.getgeneid();
temp.addElement(g.getBytes());
temp.addElement(Byte.valueOf(middlerow));
val=r.getvalues();
for(int e=0;e<=val.length-1;e++){
temp.addElement(Byte.valueOf(val[e].byteValue()));
//val[e].byteValue() fa il casting double in byte
temp.addElement(Byte.valueOf(middlerow));
}
temp.addElement(Byte.valueOf(endrow));
}
byte [] b=new byte[temp.size()];
for (int k=0;i<temp.size();i++){
b[k]=(((Byte)temp.elementAt(k)).byteValue());
}
return b;
}[/code]
Thanks for your help...
|
|
|