1 11 package org.eclipse.swt.internal.image; 12 13 14 import java.io.*; 15 16 final class LEDataOutputStream extends OutputStream { 17 OutputStream out; 18 public LEDataOutputStream(OutputStream output) { 19 this.out = output; 20 } 21 25 public void write(byte b[], int off, int len) throws IOException { 26 out.write(b, off, len); 27 } 28 31 public void write(int b) throws IOException { 32 out.write(b); 33 } 34 37 public void writeByte(byte b) throws IOException { 38 out.write(b & 0xFF); 39 } 40 44 public void writeInt(int theInt) throws IOException { 45 out.write(theInt & 0xFF); 46 out.write((theInt >> 8) & 0xFF); 47 out.write((theInt >> 16) & 0xFF); 48 out.write((theInt >> 24) & 0xFF); 49 } 50 54 public void writeShort(int theShort) throws IOException { 55 out.write(theShort & 0xFF); 56 out.write((theShort >> 8) & 0xFF); 57 } 58 } 59 | Popular Tags |