Skip to content

Instantly share code, notes, and snippets.

@linstantnoodles
Created February 5, 2013 01:31
Show Gist options
  • Save linstantnoodles/4711346 to your computer and use it in GitHub Desktop.
Save linstantnoodles/4711346 to your computer and use it in GitHub Desktop.
public synchronized String getString(int offset) {
contents.position(offset);
String new_str = "";
while(true){
char a = contents.getChar();
if(a == '\0') break;
new_str += a;
}
return new_str;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment