//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void site(final BCF2Encoder encoder, final org.broadinstitute.variant.variantcontext.VariantContext vc) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
            public override void site(BCF2Encoder encoder, VariantContext vc)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Object rawValue = vc.getAttribute(getField(), null);
                object rawValue = vc.getAttribute(Field, null);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.broadinstitute.variant.bcf2.BCF2Type type = getFieldEncoder().getType(rawValue);
                BCF2Type type = FieldEncoder.getType(rawValue);

                if (rawValue == null)
                {
                    // the value is missing, just write in null
                    encoder.encodeType(0, type);
                }
                else
                {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int valueCount = getFieldEncoder().numElements(vc, rawValue);
                    int valueCount = FieldEncoder.numElements(vc, rawValue);
                    encoder.encodeType(valueCount, type);
                    FieldEncoder.encodeValue(encoder, rawValue, type, valueCount);
                }
            }
Example #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void site(final BCF2Encoder encoder, final org.broadinstitute.variant.variantcontext.VariantContext vc) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
			public override void site(BCF2Encoder encoder, VariantContext vc)
			{
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Object rawValue = vc.getAttribute(getField(), null);
				object rawValue = vc.getAttribute(Field, null);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.broadinstitute.variant.bcf2.BCF2Type type = getFieldEncoder().getType(rawValue);
				BCF2Type type = FieldEncoder.getType(rawValue);
				if (rawValue == null)
				{
					// the value is missing, just write in null
					encoder.encodeType(0, type);
				}
				else
				{
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int valueCount = getFieldEncoder().numElements(vc, rawValue);
					int valueCount = FieldEncoder.numElements(vc, rawValue);
					encoder.encodeType(valueCount, type);
					FieldEncoder.encodeValue(encoder, rawValue, type, valueCount);
				}
			}