• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

deprecated method

 
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.
 
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
 
I'm sure glad that he's gone. Now I can read this tiny ad in peace!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic