Skip to content

Instantly share code, notes, and snippets.

@tolik518
Created August 6, 2014 14:48
Show Gist options
  • Select an option

  • Save tolik518/2f1e1753e27b9be34832 to your computer and use it in GitHub Desktop.

Select an option

Save tolik518/2f1e1753e27b9be34832 to your computer and use it in GitHub Desktop.
file = new RandomAccessFile(new File(fileName), "r");
[...]
try
{
file.seek(81);
int iYear = file.read();
file.seek(82);
int iMonth = file.read();
file.seek(83);
int iDay = file.read();
file.seek(84);
int iHour = file.read();
file.seek(85);
int iMinute = file.read();
file.seek(86);
int iSecond = file.read();
System.out.print("Datum: " + iDay+ "/" + iMonth + "/" +iYear +"\n");
System.out.print("Zeit: " + iHour+ ":" + iMinute + ":" +iSecond+ "\n");
}
catch (IOException e) {
e.printStackTrace();
}
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment