How are we suppose to fix the deprecated methods? I just changed the constructors, that's should be enough right? Or we should do something different? One specific question: what kind of encoding we should use, if we need it at all?
Adrian, I didn't see any deprecated methods in the c'tors, but maybe my assignment differs from yours. Did you compile with the <code>-deprecated</code> switch? Also, my instructions said nothing about the encoding to use, so I stuck with the default. Jerry
My assignment requires the change of the deprecated methods. I basically change some methods and constructors. As far as encoding, I'm sticking with default, I just want to make sure that it's the right way.
I am planning to subclass the given data classes, instead of changing the class itself. In case of changing the deprecated methods, is there any other way instead of replacing the method it self. Since, I don't want to make changes in the data class. Thanks in Advance, Srilatha.
You're just dealing with ascii text, so it doesn't matter if you use 8859_1 or whatever. I'm certain that the default will be fine. There is definitely a deprecation in a c'tor but in a standard JDK class, not a suncertify one - I only got 2 overall. Use the -deprecation switch as discussed. [This message has been edited by Paul Smiley (edited March 15, 2001).]
paul/Dilip, I modified with String(byte bytes, int offset, int length) in readRecord method and it works fine. But I don't know which method and how to use for getBytes method in write record method. If anyone help me i will really appreciate. joey PS whe i try to change with byte getBytes() then strange boxes appear in GUI combo box.
You'll want to use one of the other getBytes() methods - see the API. Hint, you may need to copy the arrays and build your result from there The boxes on your GUI are nulls - you will need to trim() your strings at some point.
Hi Friends, I modified 1 methos with String(byte bytes, int offset, int length) in readRecord() method, and i used getChars() insted of using getBytes() Method. After getting the char from the method, I am translating the char to byte(byte buffer). Is there anything wrong with my solution Please give me the clarification for that. Thank you Bye Anil.
I don't know really I am right to have this idea or not I have a hashtable which use the key of the record for the hashtable key and I use this record key(String) for the lock to apply synchronization within the lock method I just think if I lock the record no one can use this record concurrently and I start my modify method with no fear of other modifying the same record So I have not used the synchronized key word or synchronize block throughout the modify method Would anyone tell me if there is any problem and error with this and how to do it better?
No thanks. We have all the government we need. This tiny ad would like you to leave now: