rcp: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.ctf.core / src / org / eclipse / tracecompass / ctf / core / trace / CTFStreamPacketOutputWriter.java
1 /*******************************************************************************
2 * Copyright (c) 2015 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Bernd Hufmann - Initial API and implementation
11 *******************************************************************************/
12 package org.eclipse.tracecompass.ctf.core.trace;
13
14 import java.io.IOException;
15 import java.nio.ByteBuffer;
16 import java.nio.channels.FileChannel;
17
18 /**
19 * CTF trace packet writer.
20 *
21 * @author Bernd Hufmann
22 * @since 1.0
23 */
24 public class CTFStreamPacketOutputWriter {
25
26 /**
27 * Writes a stream packet to the output file channel based on the packet
28 * descriptor information.
29 *
30 * @param byteBuffer
31 * a byte buffer with packet to write
32 * @param fc
33 * a file channel
34 * @throws IOException
35 * if a reading or writing error occurs
36 */
37 public void writePacket(ByteBuffer byteBuffer, FileChannel fc) throws IOException {
38 fc.write(byteBuffer);
39 }
40
41 }
This page took 0.046108 seconds and 5 git commands to generate.