如何使用 J2ME 将 WAV 文件的数据提取到数组中 - JavaME
如果我有一个 WAV 文件及其数据(包括标题)如下所示:
52 49 46 46 24 08 00 00 57 41 56 45 66 6d 74 20 10 00 00 00 01 00 02 00 22 56 00 00 88 58 01 00 04 00 10 00 64 61 74 61 00 08 00 00 00 00 00 00 24 17 1e f3 3c 13 3c 14 16 f9 18 f9 34 e7 23 a6 3c f2 24 f2 11 ce 1a 0d ...
如何将其放入 J2ME 中的数组中?
If I have a WAV file and it its data (include header) like this:
52 49 46 46 24 08 00 00 57 41 56 45 66 6d 74 20 10 00 00 00 01 00 02 00
22 56 00 00 88 58 01 00 04 00 10 00 64 61 74 61 00 08 00 00 00 00 00 00
24 17 1e f3 3c 13 3c 14 16 f9 18 f9 34 e7 23 a6 3c f2 24 f2 11 ce 1a 0d ...
How can I get it into an array in J2ME ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
FileInputStream
类有一个readByte()
方法,您可以使用该方法读取数据文件的原始内容,一次读取几个字节。http://download.oracle.com/javase/1.4.2/docs/api/java/io/FileInputStream.html#read(byte[])
The
FileInputStream
class has areadByte()
method that you can use to read the raw content of a data file, a couple of byte at a time.http://download.oracle.com/javase/1.4.2/docs/api/java/io/FileInputStream.html#read(byte[])