001 package org.fusesource.hawtbuf.proto; 002 003 import java.io.IOException; 004 import java.io.OutputStream; 005 006 import org.fusesource.hawtbuf.Buffer; 007 008 009 public interface MessageBuffer<B, MB extends MessageBuffer> extends PBMessage<B, MB> { 010 011 public int serializedSizeUnframed(); 012 013 public int serializedSizeFramed(); 014 015 public Buffer toUnframedBuffer(); 016 017 public Buffer toFramedBuffer(); 018 019 public byte[] toUnframedByteArray(); 020 021 public byte[] toFramedByteArray(); 022 023 public void writeUnframed(CodedOutputStream output) throws java.io.IOException; 024 025 public void writeFramed(CodedOutputStream output) throws java.io.IOException; 026 027 public void writeUnframed(OutputStream output) throws IOException; 028 029 public void writeFramed(OutputStream output) throws java.io.IOException; 030 031 }