Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deprecated method

 
.sanjeev.
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!
1.
in my fbn project sun use to deprecated methods. i am
not able to find replacement of one of them. if you
can provide me the idea, pls. write
private void writeRecord(String[] newData) throws
IOException {
if (newData.length != description.length) {
throw new IOException("Data: Wrong number
of fields in writeRecord() " +
newData.length + "
given, " +
description.length +
" required");
}
int size, space, toCopy;
byte [] buffer = new byte[recordLen];
buffer[0] = LIVE_RECORD;
int offset = 1;
for (int i = 0; i < description.length; i++) {
space = description[i].getLength();
size = newData[i].length();
toCopy = (size <= space) ? size : space;
// -depreciated
newData[i].getBytes(0, toCopy, buffer,
offset);
offset += space;
}
db.write(buffer);
}
2.
in my instructions i am asked to implement three
methods
a.) lock
b.) unlock
c.)public DataInfo[] criteriaFind(String criteria)
but last method is not in my Data class instead i have
public synchronized DataInfo find(String toMatch)
throws DatabaseException
method. is this happened with anyone else.
thanks,
sanjeev.
 
Enrico Mannarino
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sanjeev,
1. search this forum and you will find some good answers
2. You'll have to implement the
public DataInfo[] criteriaFind(String criteria)
It's a new method, that's all!
/Enrico
 
.sanjeev.
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks and best regards,
sanjeev
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic