最显著的一个问题就是,清单6中的接口在设置或检索每个位,以及从串行端口读取字节或者向串行端口写入字节都需要一个JNI调用。
The most obvious issue is that the interface in Listing 6 requires a JNI call for each bit set or retrieved, as well as a JNI call to read a byte from, or write a byte to, the serial port.
在下一个示例中,您将首先创建一个以串行方式或者依次执行的程序,获取网站的URL,并显示页面的前1024个字节。
In the next example, you will first create a program that will serially, or one after the other, grab a URL of a website, and print out the first 1024 bytes of the page.
其中有两个构造器:一个用于将MIDI ShortMessage对象串行输入到字节阵列,而第二个用来将字节阵列和主题反序列化到MIDI ShortMessage中。
There are two constructors; one is used to serialize a MIDI ShortMessage object into a byte array whilst the second is used to deserialize a byte array and topic into a MIDI ShortMessage.
应用推荐