Examples of CircularByteBuffer


Examples of com.Ostermiller.util.CircularByteBuffer

        protected ThreadAccessRecorder threadAccessRecorder = new ThreadAccessRecorder();

        protected StreamSessionInputStream(int streamID, int bufferSize) {
            this.streamID = streamID;
            // +10 because it uses some space for internal markers
            this.buffer = new CircularByteBuffer(bufferSize + 10, true);

        }
View Full Code Here

Examples of com.Ostermiller.util.CircularByteBuffer

        this.mode = Mode.LOCAL;

        OutputStream outVideo, outActivities, outStatistics, outError;
        InputStream inVideo, inActivities, inStatistics, inError;

        videoCirc = new CircularByteBuffer(LOCAL_VIDEO_BUFFER, true);
        activityCirc = new CircularByteBuffer(100 * 1024, true);
        staticticsCirc = new CircularByteBuffer(100 * 1024, true);
        errorCirc = new CircularByteBuffer(100 * 1024, true);

        outVideo = videoCirc.getOutputStream();
        inVideo = videoCirc.getInputStream();

        outActivities = activityCirc.getOutputStream();
View Full Code Here

Examples of io.apigee.trireme.core.CircularByteBuffer

    @Test
    public void testBig()
    {
        String str = "hello world!!! the quick brown fox jumps over the lazy dog";

        buf = new CircularByteBuffer(10);
        a = str.getBytes();
        b = new byte[500];

        System.out.println("big a: " + Arrays.toString(a));
        int written = buf.write(a, 0, a.length);
View Full Code Here

Examples of io.apigee.trireme.core.CircularByteBuffer

    public void testGrowWriteRead()
    {
        int i;
        String str = "123456789";

        buf = new CircularByteBuffer(10);
        a = str.getBytes();
        b = new byte[500];

        assertTrue(a.length < b.length);
View Full Code Here

Examples of io.apigee.trireme.core.CircularByteBuffer


    @Test
    public void testSingleWriteRead()
    {
        buf = new CircularByteBuffer(5);

        for (int i = 0; i < 10; i++) {
            buf.write(100 + i);
        }
View Full Code Here

Examples of io.apigee.trireme.core.CircularByteBuffer

    }

    @Test
    public void testCapacityAvailable() {
        int cap = 10;
        buf = new CircularByteBuffer(cap);
        byte[] data = new byte[] { 1, 2, 3, 4 };

        assertEquals(cap, buf.totalCapacity());
        buf.write(data, 0, data.length);
        assertEquals(cap, buf.totalCapacity());
View Full Code Here

Examples of io.apigee.trireme.core.CircularByteBuffer

    @Test
    public void testWrap()
    {
        int cap = 10;
        buf = new CircularByteBuffer(cap);
        byte[] data = new byte[cap - 1];

        for (int i = 0; i < data.length; i++) {
            data[i] = (byte) ((1 + i) & 0xff);
        }
View Full Code Here

Examples of io.apigee.trireme.core.CircularByteBuffer

    }

    @Test
    public void testWrap2()
    {
        buf = new CircularByteBuffer(10);
        a = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
        b = new byte[500];
        int written, read;

        assertEquals(7, buf.write(a, 0, 7));
View Full Code Here

Examples of org.serviceconnector.util.CircularByteBuffer

    if (logAndDumpFiles.isEmpty()) {
      throw new FileServerException("upload log and dump files failed, no log or dump files found");
    }
    OutputStream os = null;
    ZipOutputStream zos = null;
    CircularByteBuffer cbb = new CircularByteBuffer();
    String remotePath = this.getUploadLogFileRemotePath(service, serviceName);
    UploadRunnable uploadRunnable = new UploadRunnable(client, remotePath, serviceName, cbb);
    Future<Integer> submit = AppContext.getThreadPool().submit(uploadRunnable);
    uploadRunnable.future = submit;
    @SuppressWarnings("unused")
View Full Code Here

Examples of org.serviceconnector.util.CircularByteBuffer

    if (logAndDumpFiles.isEmpty()) {
      throw new FileServerException("upload log and dump files failed, no log or dump files found");
    }
    OutputStream os = null;
    ZipOutputStream zos = null;
    CircularByteBuffer cbb = new CircularByteBuffer();
    String remotePath = this.getUploadLogFileRemotePath(service, serviceName);
    UploadRunnable uploadRunnable = new UploadRunnable(client, remotePath, serviceName, cbb);
    Future<Integer> submit = AppContext.getSCWorkerThreadPool().submit(uploadRunnable);
    uploadRunnable.future = submit;
    @SuppressWarnings("unused")
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.