Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DatastoreService datastoreService = DatastoreServiceFactory.getDatastoreService();
- BlobInfoFactory blobInfoFactory = new BlobInfoFactory(datastoreService);
- BlobInfo hi2 = blobInfoFactory.loadBlobInfo(blobKey);
- Long fileSize = hi2.getSize();
- Integer times = (int) ((fileSize + 1000000 -1) / 1000000);
- long idv3 = fileSize - 128;
- long titleFirst = fileSize - 125;
- long titleLast = fileSize - 96;
- long albumFirst = fileSize - 65;
- long albumLast = fileSize - 36;
- long artistFirst = fileSize - 95;
- long artistLast = fileSize - 66;
- byte [] titleArray = blobstoreService.fetchData(blobKey, titleFirst, titleLast);
- byte [] albumArray = blobstoreService.fetchData(blobKey, albumFirst, albumLast);
- byte [] artistArray = blobstoreService.fetchData(blobKey, artistFirst, artistLast);
- String title = new String(titleArray);
- String album = new String(albumArray);
- String artist = new String(artistArray);
- title = title.replaceAll("\\p{Cntrl}", "");
- album = album.replaceAll("\\p{Cntrl}", "");
- artist = artist.replaceAll("\\p{Cntrl}", "");
Add Comment
Please, Sign In to add comment