1 26 27 28 package org.objectweb.jonathan.apis.presentation; 29 30 import java.io.OutputStream ; 31 32 import org.objectweb.jonathan.apis.kernel.JonathanException; 33 import org.objectweb.jonathan.apis.kernel.Context; 34 import org.objectweb.jonathan.apis.resources.Chunk; 35 36 40 public interface Marshaller { 41 42 51 void write(Chunk chunk); 52 53 54 60 void writeByte(byte b) 61 throws JonathanException; 62 63 69 void writeBoolean(boolean b) 70 throws JonathanException; 71 72 81 void writeChar8(char i) 82 throws JonathanException; 83 84 90 void writeChar16(char i) 91 throws JonathanException; 92 93 99 void writeShort(short i) 100 throws JonathanException; 101 102 108 void writeInt(int i) 109 throws JonathanException; 110 111 117 void writeLong(long i) 118 throws JonathanException; 119 120 126 void writeFloat(float f) 127 throws JonathanException; 128 129 135 void writeDouble(double d) 136 throws JonathanException; 137 138 144 void writeString8(String s) 145 throws JonathanException; 146 147 153 void writeString16(String s) 154 throws JonathanException; 155 156 162 void writeReference(Object obj) throws JonathanException; 163 164 171 void writeValue(Object obj) throws JonathanException; 172 173 181 void writeByteArray(byte[] array, int offset, int length) 182 throws JonathanException; 183 184 185 191 OutputStream outputStream(); 192 193 194 202 boolean sameContents(Marshaller marshaller); 203 204 205 210 boolean isLittleEndian(); 211 212 221 Chunk getState(); 222 223 229 int getOffset(); 230 231 232 239 void setOffset(int offset); 240 241 245 Context getContext(); 246 247 255 void reset(); 256 257 258 264 void close(); 265 266 } 267 268 269 | Popular Tags |