org.ogre4j
Interface ICodec

All Superinterfaces:
IAllocatedObject<IGeneralAllocPolicy>, IGeneralAllocatedObject, INativeObject
All Known Subinterfaces:
IDDSCodec, IFreeImageCodec, IILImageCodec, IImageCodec
All Known Implementing Classes:
Codec, DDSCodec, FreeImageCodec, ILImageCodec, ImageCodec

public interface ICodec
extends INativeObject, IGeneralAllocatedObject


Nested Class Summary
static interface ICodec.ICodecData
           
static interface ICodec.ICodecDataPtr
           
static interface ICodec.ICodecIterator
           
static interface ICodec.ICodecList
           
static interface ICodec.IDecodeResult
           
 
Method Summary
 void code(IDataStreamPtr returnValue, IMemoryDataStreamPtr input, ICodec.ICodecDataPtr pData)
          Codes the data in the input stream and saves the result in the output stream.
 void codeToFile(IMemoryDataStreamPtr input, java.lang.String outFileName, ICodec.ICodecDataPtr pData)
          Codes the data in the input chunk and saves the result in the output filename provided.
 void decode(ICodec.IDecodeResult returnValue, IDataStreamPtr input)
          Codes the data from the input chunk into the output chunk.
 java.lang.String getDataType()
          Returns the type of the data that supported by this codec as a String
 java.lang.String getType()
          Returns the type of the codec as a String
 boolean magicNumberMatch(java.lang.String magicNumberPtr, int maxbytes)
          Returns whether a magic number header matches this codec.
 java.lang.String magicNumberToFileExt(java.lang.String magicNumberPtr, int maxbytes)
          Maps a magic number header to a file extension, if this codec recognises it.
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

code

void code(IDataStreamPtr returnValue,
          IMemoryDataStreamPtr input,
          ICodec.ICodecDataPtr pData)
Codes the data in the input stream and saves the result in the output stream.


codeToFile

void codeToFile(IMemoryDataStreamPtr input,
                java.lang.String outFileName,
                ICodec.ICodecDataPtr pData)
Codes the data in the input chunk and saves the result in the output filename provided. Provided for efficiency since coding to memory is progressive therefore memory required is unknown leading to reallocations.


decode

void decode(ICodec.IDecodeResult returnValue,
            IDataStreamPtr input)
Codes the data from the input chunk into the output chunk.


getType

java.lang.String getType()
Returns the type of the codec as a String


getDataType

java.lang.String getDataType()
Returns the type of the data that supported by this codec as a String


magicNumberMatch

boolean magicNumberMatch(java.lang.String magicNumberPtr,
                         int maxbytes)
Returns whether a magic number header matches this codec.


magicNumberToFileExt

java.lang.String magicNumberToFileExt(java.lang.String magicNumberPtr,
                                      int maxbytes)
Maps a magic number header to a file extension, if this codec recognises it.



Copyright © 2007 netAllied GmbH. All Rights Reserved.