0

I can read mp3 file and can play it. But now i want to change bytecode of a mp3 file. How i can see bytecode of a mp3 file ??? I also want to edit bytecode. I am searching Google for 2 days but can not find any solution. I will be very grateful if anyone help me ....

user2166895
  • 81
  • 1
  • 1
  • 7

1 Answers1

1

Unless I'm misunderstanding something, for your question, the fact that it's an mp3 is irrelevant. All you're asking how to do is read and modify a binary file. Correct me if I'm wrong here.

Doing that is relatively straightforward, although a little low level. I recommend you use this library for convenience. It has methods with descriptions like, "Reads bytes from an input stream." It also has methods with descriptions like "Writes bytes from a byte[] to an OutputStream."

So what you're going to do is read in the MP3 and store it as some variable state. Then you're going to modify that state. Then you're going to write it back out again.

Alternatively: Your question is a little vague so I can't be sure, but it may be a duplicate of Any good recommendations for MP3/Sound libraries for java?

Community
  • 1
  • 1
Daniel Kaplan
  • 54,448
  • 39
  • 189
  • 282