public class FormatArgUtils
extends java.lang.Object
A class for converting Format objects to and from strings that can be used as arguments
in command-line programs, or as parameters in URLs.
The syntax is this: all elements are separated by a colon.
Everything is uppercase by default, but case is ignored. Only thing that is lowercase is x in dimension.
Generally, each item corresponds to a constructor argument. The Format subclass is inferred from the encoding.
? is used to indicate Format.NOT_SPECIFIED (-1).
floating point values in audio formats are done as integers.
In audio formats, Big endian is B, little endian is L, signed is S, unsigned is U
Data types: B is byte[], S is short[], I is int[]
Dimension: [width]x[height], like "640x480"
Trailing not specified values may be omitted.
new AudioFormat(AudioFormat.LINEAR, 44100.0, 16, 2)
would be
LINEAR:44100:16:2
TODO: support WavAudioFormat, video formats, and other missing audio formats.
- Author:
- Ken Larson