Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * @(#)PassThroughCodec
  * 
  * Copyright (c) 2011 Werner Randelshofer, Goldau, Switzerland.
  * All rights reserved.
  * 
  * You may not use, copy or modify this file, except in compliance with the
  * license agreement you entered into with Werner Randelshofer.
  * For details see accompanying license terms. 
 */
package org.monte.media.converter;
PassThroughCodec passes through all buffers.

Author(s):
Werner Randelshofer
Version:
$Id: PassThroughCodec.java 299 2013-01-03 07:40:18Z werner $
public class PassThroughCodec extends AbstractCodec {
    public PassThroughCodec() {
        super(new Format[]{
                    new Format(), //
                },
                new Format[]{
                    new Format(), //
                });
         = "Pass Through";
    }
    @Override
    public Format setInputFormat(Format f) {
        Format fNewsuper.setInputFormat(f);
        =fNew;
        return fNew;
    }
    
    
    @Override
    public int process(Buffer inBuffer out) {
        out.setMetaTo(in);
        out.setDataTo(in);
        return ;
    }
New to GrepCode? Check out our FAQ X