Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!

Joseph Tsui

Greenhorn
+ Follow
since Jan 05, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Joseph Tsui

the value will be return to the program that trigger this method.
12 years ago
Hi All,

I am trying to implement a client program that can obtain record from MSSQL. I am using hibernate to do that.

So client A and client B will get record from DB server
both client A and B are on different machines

How can i prevent the situation that

ClientA get
ClientB get
ClientA update
ClientB update

In the database, i have a retrieve flag for each record. once the client get the record, it will update the record with the retrieve flag = true

Anyone can provide me advice on that? thanks a million
Hi All,

I am trying to reuse the BufferedInputStream, it throws some error. How should I use the mark and reset method ? thanks in advance




java.io.IOException: Mark invalid
at java.io.BufferedReader.reset(BufferedReader.java:485)
at TestCookie.main(TestCookie.java:32)

[Nitesh: Added Code Tags.]
12 years ago
thanks for the reply, yes, it's working now. previously the charsets.jar is not loaded
12 years ago
I tried to use the InputStreamReader to convert String that retrieve from a html page from Big5 to UTF-8.
previously, it works fine with jdk 1.5

After i upgraded to jdk 1.6 , it returns me the error as below

java.io.UnsupportedEncodingException: big5
at sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)

I find that the charset supported by both version are different

How to make it work in 1.6 if i want to use some charset that previously supported ?

thanks in advance
12 years ago
I tried to use the InputStreamReader to convert from one Big5 to UTF-8.
previously, it works fine with jdk 1.5

After i upgraded to jdk 1.6 , it returns me the error as below

java.io.UnsupportedEncodingException: big5
at sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)

I find that the charset supported by both version are different

How to make it work in 1.6 if i want to use some charset that previously supported ?

thanks in advance
12 years ago