Mp3Song - 128 s byte a = new byte[128...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
package lab08; p import; import; i public class Mp3Song { p public static void main(String[] args) throws IOException { p RandomAccessFile song = new RandomAccessFile("C:\\Users\\Aldin's Laptop W7\\Desktop\\Coms 227 Files\\song.mp3", "r"); //DataInputStream song = new DataInputStream(new FileInputStream("C:\\Users\\ Aldin's Laptop W7\\Desktop\\Coms 227 Files\\song.mp3"));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: - 128)); s byte a = new byte[128]; b for(int i = 0; i < 128; i++){ a[i] = song.readByte(); } String b = new String(a); System.out.println(b.substring(0, 3)); System.out.println(b.substring(3, 33)); System.out.println(b.substring(33, 63)); System.out.println(b.substring(63, 67)); System.out.println(b.substring(67, 100)); System.out.println(a[127]); S }}...
View Full Document

This note was uploaded on 09/20/2011 for the course COM SCI 227 taught by Professor Staff during the Spring '11 term at Iowa State.

Ask a homework question - tutors are online