Mercurial > hg > Members > riono > TreeVNC_ja_comment
view src/main/java/jp/ac/u_ryukyu/treevnc/SoundPacketQueue.java @ 403:3a7d02844cfe
Enable AdvancedMenu to RootSelectionPanel
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 19 Oct 2015 17:35:07 +0900 |
parents | 3ede63861103 |
children |
line wrap: on
line source
package jp.ac.u_ryukyu.treevnc; import com.glavsoft.rfb.encoding.decoder.ByteBuffer; import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; /** * Created by OcBookPro on 15/01/15. */ public class SoundPacketQueue { private final BlockingQueue<byte[]> queue; public SoundPacketQueue(BlockingQueue<byte[]> queue) { this.queue = queue; } public void put(byte[] packet) { queue.offer(packet); } public byte[] get() throws InterruptedException { return queue.poll(1, TimeUnit.SECONDS); } }