@Override public ByteBuffer getData() throws IOException { Transcoder t = track.transcoders.get(); if (t == null) { t = new Transcoder(track); track.transcoders.set(t); } ByteBuffer buf = ByteBuffer.allocate(track.frameSize); ByteBuffer data = src.getData(); return t.transcodeFrame(data, buf); }
/* (non-Javadoc) * @see semantic.CBaseDataEntity#GetSpecialAssignment(parser.expression.CTerminal) */ public CBaseActionEntity GetSpecialAssignment(CTerminal term, CBaseEntityFactory factory, int l) { String value = term.GetValue(); CEntitySetConstant eAssign = factory.NewEntitySetConstant(l); if (value.equals(CCobolConstantList.ZERO.m_Name) || value.equals(CCobolConstantList.ZEROS.m_Name) || value.equals(CCobolConstantList.ZEROES.m_Name)) { eAssign.SetToZero(this); } else if (value.equals(CCobolConstantList.SPACE.m_Name) || value.equals(CCobolConstantList.SPACES.m_Name)) { eAssign.SetToSpace(this); } else if (value.equals(CCobolConstantList.LOW_VALUE.m_Name) || value.equals(CCobolConstantList.LOW_VALUES.m_Name)) { eAssign.SetToLowValue(this); } else if (value.equals(CCobolConstantList.HIGH_VALUE.m_Name) || value.equals(CCobolConstantList.HIGH_VALUES.m_Name)) { eAssign.SetToHighValue(this); } else if (term.IsNumber() && (m_Type.equals("picX") || m_Type.equals(""))) { String type = m_Type; if (type.equals("")) type = "GROUP"; CEntityAssign asgn = factory.NewEntityAssign(l); asgn.SetValue(factory.NewEntityString(value)); asgn.AddRefTo(this); Transcoder.logInfo( l, "Number converted to string to move into " + type + " var (" + GetName() + "): " + value); RegisterWritingAction(asgn); return asgn; } else { return null; } return eAssign; }