Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Mobile Tools for Java (MTJ) » Create a file in memory
Create a file in memory [message #569280] Sun, 21 December 2008 22:00
Eclipse UserFriend
Originally posted by:

I want to create a file stream in memory. In my case it's a midifile.
This file has a specified format. The header and other blocks have
variables of different types. A byte[] buffer is associated to the
class. My question now is how can I easily write my different variables
sequentially into the buffer? How will the headerChunk.write() function
look like? Here comes a little excerpt.


public class MidiFile extends ByteArrayInputStream {
class headerChunk {
final byte[] Id = { 'M', 'T', 'h', 'd' };
final int Size = 6;
short Format = 0;
short NumTracks = 1;
short TimeDiv;

void write(....); ????
Previous Topic:MTJ 0.9.1 RC2 now available for download
Next Topic:Create a file in memory
Goto Forum:

Current Time: Sun Jun 24 22:56:48 GMT 2018

Powered by FUDForum. Page generated in 0.01814 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top