• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

I am getting error in this code  RSS feed

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am getting " java.io.EOFException " while retriving data from RMS. i have succeded in storing data in RMS(because getRecord() giving 27 value) so i am confirm that error is while retrieving ..,....i dont know why i am getting this error so please give me suggestion to execut following code

Thanks in advance
******* Here is the code ************

public void getDataFromRMS( )
{
System.out.println(".........Rretiving record........................");

byte[] data = new byte[100];
ByteArrayInputStream buff =new ByteArrayInputStream(data);
DataInputStream input=new DataInputStream(buff);

String msg=null;
int value=0;
boolean state=false;

int len=0;

try{
for(int i=1; i<=rs.getNumRecords() ; i++)
{
len = rs.getRecord(i,data,0);
System.out.println("inside for lop:"+len);
//i am getting error in the following code
msg = input.readUTF();
state = input.readBoolean();
value = input.readInt();

buff.reset();

}

System.out.println(""+msg+":"+state+":"+value);
input.close();
buff.close();

}catch(Exception e)
{
System.out.println("error while retreiving data::"+e);
}

************************output*******************************

Running with storage root DefaultColorPhone

.........Rretiving record........................

exe retiving record........................

inside for lop:27

error wile retreiving data::java.io.EOFException
 
Harish Tiruvile
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i GOT the ERROR .....actually code is correct but if i Run with " DefaultColorPhone" i will get " java.io.EOFException " Exception .

i WILL NOT get error if i Run with " DefaultGrayPhone" ..

why this kind of error i am getting...please give me reason if you know this

thanks in advance
 
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!