while loop - java 1.7 - how to read same data on different position using same code/method -


i have while operator reading data,

int typearr =0 ; int newobj = 0; int  name = 0; while((name =readint()) != 0x00) {     int info = in.readunsignedbyte();     int type = in.readunsignedbyte();     if(propertysizetype == 1) {         typearr = in.readunsignedbyte();         (int k = 0; k < typearr; k++) {             newobj = in.readunsignedbyte();         }     }  } 

problem after readed newobj value, need move position - that

in.seek(newobj); 

after need repeat same process did in above(while ...) how can ?

use function javadoc

  while((name =readint()) != 0x00) {    try{       int info = in.readunsignedbyte();      int type = in.readunsignedbyte();       if(propertysizetype == 1) {     typearr = in.readunsignedbyte();     (int k = 0; k < typearr; k++) {         newobj = in.readunsignedbyte();         in.seek(newobj);  // newobj should long        }     }     }catch(exception e)     {          e.printstacktrace();          break;     }    } 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -