Guava LittleEndianDataOutputStream - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava LittleEndianDataOutputStream class.

This code example shows how to use the following methods:writeShort
 
    @Override 
    public void writeShort(int value)
    { 
        try { 
            dataOutputStream.writeShort(value);
        } 
        catch (IOException e) {
            throw new RuntimeIOException(e);
        } 
    } 
 
    @Override 
    public void writeInt(int value)
    { 
        try { 
            dataOutputStream.writeInt(value);
        } 
        catch (IOException e) {
            throw new RuntimeIOException(e);
3
CodeRank
This code example shows how to use the following methods:
    public BufferedFileDataOutputStream(File file, ByteOrder order, int bufferSize) throws FileNotFoundException {
        raf = new RandomAccessFile(file, "rw");
        this.channel = raf.getChannel();
        buffer = ByteBuffer.allocate(bufferSize);
        if (order == ByteOrder.LITTLE_ENDIAN) {
            dataOut = new LittleEndianDataOutputStream(this);
        } else if (order == ByteOrder.BIG_ENDIAN) {
            dataOut = new DataOutputStream(this);
        } else { 
            throw new IllegalArgumentException(order+" is not ByteOrder.BIG_ENDIAN or ByteOrder.LITTLE_ENDIAN");
        } 
    } 
 
    @Override 
    public void write(final int b) throws IOException {
        if (buffer.remaining() == 0) {
            flush(); 
        } 
        buffer.put((byte)b);
    } 
3
CodeRank
See Code Examples for Guava LittleEndianDataOutputStream Methods: