Java ByteBuffer Write writeTs(ByteBuffer is, long ts)

Here you can find the source of writeTs(ByteBuffer is, long ts)

Description

write Ts

License

BSD License

Declaration

public static void writeTs(ByteBuffer is, long ts) 

Method Source Code

//package com.java2s;
/**/*www.  ja va2 s .  co m*/
 * This class is part of JCodec ( www.jcodec.org ) This software is distributed
 * under FreeBSD License
 * 
 * Demuxer for MPEG Program Stream format
 * 
 * @author The JCodec project
 * 
 */

import java.nio.ByteBuffer;

public class Main {
    public static void writeTs(ByteBuffer is, long ts) {
        is.put((byte) ((ts >> 29) << 1));
        is.put((byte) (ts >> 22));
        is.put((byte) ((ts >> 15) << 1));
        is.put((byte) (ts >> 7));
        is.put((byte) (ts >> 1));
    }
}

Related

  1. writeTo(ByteBuffer buffer, File file)
  2. writeToChannel(final WritableByteChannel destChannel, final ByteBuffer buffer)
  3. writeToChannel(WritableByteChannel chan, ByteBuffer buffer)
  4. writeToChannel(WritableByteChannel dst, ByteBuffer src)
  5. writeToFile(String name, ByteBuffer bb)
  6. writetUnsignedInt(ByteBuffer buffer, long value)
  7. writeUB2(ByteBuffer buffer, int i)
  8. writeUnsigned(int num, int size, ByteBuffer out)
  9. writeUnsignedInt(ByteBuffer buf, long value)