@@ -0,0 +1,1319 @@
+package io;%0D%0A%0D%0Aimport java.io.IOException;%0D%0Aimport java.io.UnsupportedEncodingException;%0D%0A%0D%0Aimport org.junit.Test;%0D%0A%0D%0Aimport com.takin.emmet.io.traffic.shm.queue.Block;%0D%0Aimport com.takin.emmet.io.traffic.shm.queue.Queue;%0D%0Aimport com.takin.emmet.io.traffic.util.Util;%0D%0A%0D%0Apublic class QueneTest %7B%0D%0A%0D%0A    @Test%0D%0A    public void read() %7B%0D%0A        Queue queue = Queue.map(%22D:/shm%22, 2000L, 1, 0);%0D%0A        queue.init();%0D%0A%0D%0A        while (true) %7B%0D%0A            try %7B%0D%0A                Block block = queue.poll();%0D%0A                if (block != null) %7B%0D%0A                    System.out.println(new String(block.getPayload(), %22UTF-8%22));%0D%0A                %7D else %7B%0D%0A                    Util.pause(10);%0D%0A                %7D%0D%0A            %7D catch (UnsupportedEncodingException e) %7B%0D%0A                e.printStackTrace();%0D%0A            %7D%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    @Test%0D%0A    public void write() %7B%0D%0A        try %7B%0D%0A            Queue queue = Queue.map(%22D:/shm%22, 2000L, 1, 0);%0D%0A            String string = %22hello, world%22;%0D%0A            byte%5B%5D bytes = string.getBytes(%22UTF-8%22);%0D%0A            System.out.println(queue.put(new Block(bytes)));%0D%0A%0D%0A            queue.close();%0D%0A        %7D catch (UnsupportedEncodingException e) %7B%0D%0A            e.printStackTrace();%0D%0A        %7D catch (IOException e) %7B%0D%0A            e.printStackTrace();%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

add test