yijunyu/c-to-rust huggingface dataset:
// Original:
public int newSlice(final int size) {if (byteUpto > BYTE_BLOCK_SIZE-size)nextBuffer();final int upto = byteUpto;byteUpto += size;buffer[byteUpto-1] = 16;return upto;}

// Translation:
public int NewSlice(int size){if (ByteUpto > BYTE_BLOCK_SIZE - size){NextBuffer();}int upto = ByteUpto;ByteUpto += size;buffer[ByteUpto - 1] = 16;return upto;}
// Original:
public DescribeWorkspaceDirectoriesResult describeWorkspaceDirectories() {return describeWorkspaceDirectories(new DescribeWorkspaceDirectoriesRequest());}

// Translation:
public virtual DescribeWorkspaceDirectoriesResponse DescribeWorkspaceDirectories(){var request = new DescribeWorkspaceDirectoriesRequest();return DescribeWorkspaceDirectories(request);}
// Original:
public String toString() {return getClass().getName() + " [" +_functionName +"]";}

// Translation:
public override String ToString(){StringBuilder sb = new StringBuilder(64);sb.Append(GetType().Name).Append(" [");sb.Append(_functionName);sb.Append("]");return sb.ToString();}
// Original:
public void writeBytes(int stream, byte[] b, int offset, int len) {final int end = offset + len;for(int i=offset;i<end;i++)writeByte(stream, b[i]);}

// Translation:
public void WriteBytes(int stream, byte[] b, int offset, int len){int end = offset + len;for (int i = offset; i < end; i++){WriteByte(stream, b[i]);}}
// Original:
public GetExportSnapshotRecordsResult getExportSnapshotRecords(GetExportSnapshotRecordsRequest request) {request = beforeClientExecution(request);return executeGetExportSnapshotRecords(request);}

// Translation:
public virtual GetExportSnapshotRecordsResponse GetExportSnapshotRecords(GetExportSnapshotRecordsRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetExportSnapshotRecordsRequestMarshaller.Instance;options.ResponseUnmarshaller = GetExportSnapshotRecordsResponseUnmarshaller.Instance;return Invoke<GetExportSnapshotRecordsResponse>(request, options);}
// Original:
public DeleteMessageResult deleteMessage(String queueUrl, String receiptHandle) {return deleteMessage(new DeleteMessageRequest().withQueueUrl(queueUrl).withReceiptHandle(receiptHandle));}

// Translation:
public virtual DeleteMessageResponse DeleteMessage(string queueUrl, string receiptHandle){var request = new DeleteMessageRequest();request.QueueUrl = queueUrl;request.ReceiptHandle = receiptHandle;return DeleteMessage(request);}
// Original:
public ModifyInstanceAttributeResult modifyInstanceAttribute(ModifyInstanceAttributeRequest request) {request = beforeClientExecution(request);return executeModifyInstanceAttribute(request);}

// Translation:
public virtual ModifyInstanceAttributeResponse ModifyInstanceAttribute(ModifyInstanceAttributeRequest request){var options = new InvokeOptions();options.RequestMarshaller = ModifyInstanceAttributeRequestMarshaller.Instance;options.ResponseUnmarshaller = ModifyInstanceAttributeResponseUnmarshaller.Instance;return Invoke<ModifyInstanceAttributeResponse>(request, options);}
// Original:
public static float[] copyOfRange(float[] original, int start, int end) {if (start > end) {throw new IllegalArgumentException();}int originalLength = original.length;if (start < 0 || start > originalLength) {throw new ArrayIndexOutOfBoundsException();}int resultLength = end - start;int copyLength = Math.min(resultLength, originalLength - start);float[] result = new float[resultLength];System.arraycopy(original, start, result, 0, copyLength);return result;}

// Translation:
public static float[] copyOfRange(float[] original, int start, int end){if (start > end){throw new System.ArgumentException();}int originalLength = original.Length;if (start < 0 || start > originalLength){throw new System.IndexOutOfRangeException();}int resultLength = end - start;int copyLength = System.Math.Min(resultLength, originalLength - start);float[] result = new float[resultLength];System.Array.Copy(original, start, result, 0, copyLength);return result;}
// Original:
public TokenFilter create(TokenStream input) {SnowballStemmer program;try {program = stemClass.getConstructor().newInstance();} catch (Exception e) {

// Translation:
public override TokenStream Create(TokenStream input){SnowballProgram program;try{program = (SnowballProgram)Activator.CreateInstance(stemClass);}catch (Exception e){
// Original:
public GetPhotosByMd5sRequest() {super("CloudPhoto", "2017-07-11", "GetPhotosByMd5s", "cloudphoto");setProtocol(ProtocolType.HTTPS);}

// Translation:
public GetPhotosByMd5sRequest(): base("CloudPhoto", "2017-07-11", "GetPhotosByMd5s", "cloudphoto", "openAPI"){Protocol = ProtocolType.HTTPS;}
// Original:
public StartOutboundVoiceContactResult startOutboundVoiceContact(StartOutboundVoiceContactRequest request) {request = beforeClientExecution(request);return executeStartOutboundVoiceContact(request);}

// Translation:
public virtual StartOutboundVoiceContactResponse StartOutboundVoiceContact(StartOutboundVoiceContactRequest request){var options = new InvokeOptions();options.RequestMarshaller = StartOutboundVoiceContactRequestMarshaller.Instance;options.ResponseUnmarshaller = StartOutboundVoiceContactResponseUnmarshaller.Instance;return Invoke<StartOutboundVoiceContactResponse>(request, options);}
// Original:
public void serialize(LittleEndianOutput out) {out.writeInt(field_1_x);out.writeInt(field_2_y);out.writeInt(field_3_width);out.writeInt(field_4_height);}

// Translation:
public override void Serialize(ILittleEndianOutput out1){out1.WriteInt(field_1_x);out1.WriteInt(field_2_y);out1.WriteInt(field_3_width);out1.WriteInt(field_4_height);}
// Original:
public String getEmailAddress() {return emailAddress;}

// Translation:
public virtual string GetEmailAddress(){return emailAddress;}
// Original:
public ValueEval getRelativeValue(int sheetIndex, int relativeRowIndex, int relativeColumnIndex) {int rowIx = (relativeRowIndex + getFirstRow() ) ;int colIx = (relativeColumnIndex + getFirstColumn() ) ;return _evaluator.getEvalForCell(sheetIndex, rowIx, colIx);}

// Translation:
public override ValueEval GetRelativeValue(int sheetIndex, int relativeRowIndex, int relativeColumnIndex){int rowIx = (relativeRowIndex + FirstRow);int colIx = (relativeColumnIndex + FirstColumn);return _evaluator.GetEvalForCell(sheetIndex, rowIx, colIx);}
// Original:
public String toString() {StringBuilder sb = new StringBuilder();sb.append('[');for (byte[] b : table) {if (b == null)continue;if (sb.length() > 1)sb.append(" , "); sb.append('"');sb.append(RawParseUtils.decode(b));sb.append('"');sb.append('(');sb.append(chainlength(b));sb.append(')');}sb.append(']');return sb.toString();}

// Translation:
public override string ToString(){StringBuilder r = new StringBuilder();r.Append("(");for (int i = 0; i < subfilters.Length; i++){if (i > 0){r.Append(" AND ");}r.Append(subfilters[i].ToString());}r.Append(")");return r.ToString();}
// Original:
public void stopNow() {super.stopNow();if (runningParallelTasks != null) {for(ParallelTask t : runningParallelTasks) {if (t != null) {t.task.stopNow();}}}}

// Translation:
public override void StopNow(){base.StopNow();if (runningParallelTasks != null){foreach (ParallelTask t in runningParallelTasks){if (t != null){t.Task.StopNow();}}}}
// Original:
public UpdateLogPatternResult updateLogPattern(UpdateLogPatternRequest request) {request = beforeClientExecution(request);return executeUpdateLogPattern(request);}

// Translation:
public virtual UpdateLogPatternResponse UpdateLogPattern(UpdateLogPatternRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateLogPatternRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateLogPatternResponseUnmarshaller.Instance;return Invoke<UpdateLogPatternResponse>(request, options);}
// Original:
public FileMode getMode() {return mode;}

// Translation:
public override FileMode GetMode(){return mode;}
// Original:
public ValueEval getEvalForCell(int sheetIndex, int rowIndex, int columnIndex) {return getSheetEvaluator(sheetIndex).getEvalForCell(rowIndex, columnIndex);}

// Translation:
public ValueEval GetEvalForCell(int sheetIndex, int rowIndex, int columnIndex){return GetSheetEvaluator(sheetIndex).GetEvalForCell(rowIndex, columnIndex);}
// Original:
public String toString() {final StringBuilder buffer = new StringBuilder();for (Class<?> clazz = getClass(); clazz != null; clazz = clazz.getSuperclass()) {if (!clazz.isAnonymousClass()) {buffer.append(clazz.getSimpleName());break;}}buffer.append('(');final List<? extends IndexReader> subReaders = getSequentialSubReaders();assert subReaders != null;if (!subReaders.isEmpty()) {buffer.append(subReaders.get(0));for (int i = 1, c = subReaders.size(); i < c; ++i) {buffer.append(" ").append(subReaders.get(i));}}buffer.append(')');return buffer.toString();}

// Translation:
public override string ToString(){StringBuilder buffer = new StringBuilder();for (Type clazz = this.GetType(); clazz != null; clazz = clazz.GetTypeInfo().BaseType){if (clazz.Name != null){buffer.Append(clazz.Name);break;}}buffer.Append('(');var subReaders = GetSequentialSubReaders();Debug.Assert(subReaders != null);if (subReaders.Count > 0){buffer.Append(subReaders[0]);for (int i = 1, c = subReaders.Count; i < c; ++i){buffer.Append(" ").Append(subReaders[i]);}}buffer.Append(')');return buffer.ToString();}
// Original:
public CreateTypedLinkFacetResult createTypedLinkFacet(CreateTypedLinkFacetRequest request) {request = beforeClientExecution(request);return executeCreateTypedLinkFacet(request);}

// Translation:
public virtual CreateTypedLinkFacetResponse CreateTypedLinkFacet(CreateTypedLinkFacetRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateTypedLinkFacetRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateTypedLinkFacetResponseUnmarshaller.Instance;return Invoke<CreateTypedLinkFacetResponse>(request, options);}
// Original:
public PutResolverRulePolicyResult putResolverRulePolicy(PutResolverRulePolicyRequest request) {request = beforeClientExecution(request);return executePutResolverRulePolicy(request);}

// Translation:
public virtual PutResolverRulePolicyResponse PutResolverRulePolicy(PutResolverRulePolicyRequest request){var options = new InvokeOptions();options.RequestMarshaller = PutResolverRulePolicyRequestMarshaller.Instance;options.ResponseUnmarshaller = PutResolverRulePolicyResponseUnmarshaller.Instance;return Invoke<PutResolverRulePolicyResponse>(request, options);}
// Original:
public ConfirmPublicVirtualInterfaceResult confirmPublicVirtualInterface(ConfirmPublicVirtualInterfaceRequest request) {request = beforeClientExecution(request);return executeConfirmPublicVirtualInterface(request);}

// Translation:
public virtual ConfirmPublicVirtualInterfaceResponse ConfirmPublicVirtualInterface(ConfirmPublicVirtualInterfaceRequest request){var options = new InvokeOptions();options.RequestMarshaller = ConfirmPublicVirtualInterfaceRequestMarshaller.Instance;options.ResponseUnmarshaller = ConfirmPublicVirtualInterfaceResponseUnmarshaller.Instance;return Invoke<ConfirmPublicVirtualInterfaceResponse>(request, options);}
// Original:
public FieldInfo add(FieldInfo fi) {return add(fi, -1);}

// Translation:
public FieldInfo Add(FieldInfo fi){return AddOrUpdateInternal(fi.Name, fi.Number, fi.IsIndexed, fi.HasVectors, fi.OmitsNorms, fi.HasPayloads, fi.IndexOptions, fi.DocValuesType, fi.NormType);}
// Original:
public AssociateFleetResult associateFleet(AssociateFleetRequest request) {request = beforeClientExecution(request);return executeAssociateFleet(request);}

// Translation:
public virtual AssociateFleetResponse AssociateFleet(AssociateFleetRequest request){var options = new InvokeOptions();options.RequestMarshaller = AssociateFleetRequestMarshaller.Instance;options.ResponseUnmarshaller = AssociateFleetResponseUnmarshaller.Instance;return Invoke<AssociateFleetResponse>(request, options);}
// Original:
public void close() {ctx.close();}

// Translation:
public override void Close(){wc.Release();}
// Original:
public InclusiveRange(long start, long end) {assert end >= start;this.start = start;this.end = end;}

// Translation:
public InclusiveRange(long start, long end){Debug.Assert(end >= start);this.Start = start;this.End = end;}
// Original:
public UpdateProfilingGroupResult updateProfilingGroup(UpdateProfilingGroupRequest request) {request = beforeClientExecution(request);return executeUpdateProfilingGroup(request);}

// Translation:
public virtual UpdateProfilingGroupResponse UpdateProfilingGroup(UpdateProfilingGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateProfilingGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateProfilingGroupResponseUnmarshaller.Instance;return Invoke<UpdateProfilingGroupResponse>(request, options);}
// Original:
public void seekExact(long ord) throws IOException {throw new UnsupportedOperationException(getClass().getName()+" does not support seeking");}

// Translation:
public override void SeekExact(long ord){throw new System.NotSupportedException(this.GetType().Name + " does not support seeking");}
// Original:
public DetectStackSetDriftResult detectStackSetDrift(DetectStackSetDriftRequest request) {request = beforeClientExecution(request);return executeDetectStackSetDrift(request);}

// Translation:
public virtual DetectStackSetDriftResponse DetectStackSetDrift(DetectStackSetDriftRequest request){var options = new InvokeOptions();options.RequestMarshaller = DetectStackSetDriftRequestMarshaller.Instance;options.ResponseUnmarshaller = DetectStackSetDriftResponseUnmarshaller.Instance;return Invoke<DetectStackSetDriftResponse>(request, options);}
// Original:
public ListConfigurationProfilesResult listConfigurationProfiles(ListConfigurationProfilesRequest request) {request = beforeClientExecution(request);return executeListConfigurationProfiles(request);}

// Translation:
public virtual ListConfigurationProfilesResponse ListConfigurationProfiles(ListConfigurationProfilesRequest request){var options = new InvokeOptions();options.RequestMarshaller = ListConfigurationProfilesRequestMarshaller.Instance;options.ResponseUnmarshaller = ListConfigurationProfilesResponseUnmarshaller.Instance;return Invoke<ListConfigurationProfilesResponse>(request, options);}
// Original:
public int getFormat() {return FORMAT_OTHER;}

// Translation:
public virtual int GetFormat(){return FORMAT_OTHER;}
// Original:
public K lastKey() {Entry<K, V> entry = endpoint(false);if (entry == null) {throw new NoSuchElementException();}return entry.getKey();}

// Translation:
public K lastKey(){java.util.MapClass.Entry<K, V> entry = this.endpoint(false);if (entry == null){throw new java.util.NoSuchElementException();}return entry.getKey();}
// Original:
public final void writeChars(String str) throws IOException {write(str.getBytes("UTF-16BE"));}

// Translation:
public virtual void writeChars(string str){throw new System.NotImplementedException();}
// Original:
public UpdateFleetPortSettingsResult updateFleetPortSettings(UpdateFleetPortSettingsRequest request) {request = beforeClientExecution(request);return executeUpdateFleetPortSettings(request);}

// Translation:
public virtual UpdateFleetPortSettingsResponse UpdateFleetPortSettings(UpdateFleetPortSettingsRequest request){var options = new InvokeOptions();options.RequestMarshaller = UpdateFleetPortSettingsRequestMarshaller.Instance;options.ResponseUnmarshaller = UpdateFleetPortSettingsResponseUnmarshaller.Instance;return Invoke<UpdateFleetPortSettingsResponse>(request, options);}
// Original:
public RuleTransition(RuleStartState ruleStart,int ruleIndex,int precedence,ATNState followState){super(ruleStart);this.ruleIndex = ruleIndex;this.precedence = precedence;this.followState = followState;}

// Translation:
public RuleTransition(RuleStartState ruleStart, int ruleIndex, int precedence, ATNState followState): base(ruleStart){this.ruleIndex = ruleIndex;this.precedence = precedence;this.followState = followState;}
// Original:
public GetConferenceProviderResult getConferenceProvider(GetConferenceProviderRequest request) {request = beforeClientExecution(request);return executeGetConferenceProvider(request);}

// Translation:
public virtual GetConferenceProviderResponse GetConferenceProvider(GetConferenceProviderRequest request){var options = new InvokeOptions();options.RequestMarshaller = GetConferenceProviderRequestMarshaller.Instance;options.ResponseUnmarshaller = GetConferenceProviderResponseUnmarshaller.Instance;return Invoke<GetConferenceProviderResponse>(request, options);}
// Original:
public void decode(byte[] blocks, int blocksOffset, long[] values,int valuesOffset, int iterations) {for (int i = 0; i < iterations; ++i) {final long block = readLong(blocks, blocksOffset);blocksOffset += 8;valuesOffset = decode(block, values, valuesOffset);}}

// Translation:
public override void Decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations){for (int i = 0; i < iterations; ++i){long block = ReadInt64(blocks, blocksOffset);blocksOffset += 8;valuesOffset = Decode(block, values, valuesOffset);}}
// Original:
public void serialize(LittleEndianOutput out) {out.write(_data);}

// Translation:
public override void Serialize(ILittleEndianOutput out1){out1.Write(field_1_data);}
// Original:
public void upgrade() throws IOException {if (!DirectoryReader.indexExists(dir)) {throw new IndexNotFoundException(dir.toString());}if (!deletePriorCommits) {final Collection<IndexCommit> commits = DirectoryReader.listCommits(dir);if (commits.size() > 1) {throw new IllegalArgumentException("This tool was invoked to not delete prior commit points, but the following commits were found: " + commits);}}iwc.setMergePolicy(new UpgradeIndexMergePolicy(iwc.getMergePolicy()));iwc.setIndexDeletionPolicy(new KeepOnlyLastCommitDeletionPolicy());try (final IndexWriter w = new IndexWriter(dir, iwc)) {InfoStream infoStream = iwc.getInfoStream();if (infoStream.isEnabled(LOG_PREFIX)) {infoStream.message(LOG_PREFIX, "Upgrading all pre-" + Version.LATEST + " segments of index directory '" + dir + "' to version " + Version.LATEST + "...");}w.forceMerge(1);if (infoStream.isEnabled(LOG_PREFIX)) {infoStream.message(LOG_PREFIX, "All segments upgraded to version " + Version.LATEST);infoStream.message(LOG_PREFIX, "Enforcing commit to rewrite all index metadata...");}w.setLiveCommitData(w.getLiveCommitData()); assert w.hasUncommittedChanges();w.commit();if (infoStream.isEnabled(LOG_PREFIX)) {infoStream.message(LOG_PREFIX, "Committed upgraded metadata to index.");}}}

// Translation:
public void Upgrade(){if (!DirectoryReader.IndexExists(dir)){throw new IndexNotFoundException(dir.ToString());}if (!deletePriorCommits){ICollection<IndexCommit> commits = DirectoryReader.ListCommits(dir);if (commits.Count > 1){throw new System.ArgumentException("this tool was invoked to not delete prior commit points, but the following commits were found: " + commits);}}IndexWriterConfig c = (IndexWriterConfig)iwc.Clone();c.MergePolicy = new UpgradeIndexMergePolicy(c.MergePolicy);c.IndexDeletionPolicy = new KeepOnlyLastCommitDeletionPolicy();IndexWriter w = new IndexWriter(dir, c);try{InfoStream infoStream = c.InfoStream;if (infoStream.IsEnabled("IndexUpgrader")){infoStream.Message("IndexUpgrader", "Upgrading all pre-" + Constants.LUCENE_MAIN_VERSION + " segments of index directory '" + dir + "' to version " + Constants.LUCENE_MAIN_VERSION + "...");}w.ForceMerge(1);if (infoStream.IsEnabled("IndexUpgrader")){infoStream.Message("IndexUpgrader", "All segments upgraded to version " + Constants.LUCENE_MAIN_VERSION);}}finally{w.Dispose();}}
// Original:
public byte[] getThumbnailAsWMF() throws HPSFException{if (!(getClipboardFormatTag() == CFTAG_WINDOWS))throw new HPSFException("Clipboard Format Tag of Thumbnail must " +"be CFTAG_WINDOWS.");if (!(getClipboardFormat() == CF_METAFILEPICT)) {throw new HPSFException("Clipboard Format of Thumbnail must " +"be CF_METAFILEPICT.");}byte[] thumbnail = getThumbnail();int wmfImageLength = thumbnail.length - OFFSET_WMFDATA;byte[] wmfImage = new byte[wmfImageLength];System.arraycopy(thumbnail,OFFSET_WMFDATA,wmfImage,0,wmfImageLength);return wmfImage;}

// Translation:
public byte[] GetThumbnailAsWMF(){if (!(ClipboardFormatTag == CFTAG_WINDOWS))throw new HPSFException("Clipboard Format Tag of Thumbnail must " +"be CFTAG_WINDOWS.");if (!(GetClipboardFormat() == CF_METAFILEPICT))throw new HPSFException("Clipboard Format of Thumbnail must " +"be CF_METAFILEPICT.");else{byte[] thumbnail = this.ThumbnailData;int wmfImageLength = thumbnail.Length - OFFSet_WMFDATA;byte[] wmfImage = new byte[wmfImageLength];System.Array.Copy(thumbnail,OFFSet_WMFDATA,wmfImage,0,wmfImageLength);return wmfImage;}}
// Original:
public DescribeKeyPhrasesDetectionJobResult describeKeyPhrasesDetectionJob(DescribeKeyPhrasesDetectionJobRequest request) {request = beforeClientExecution(request);return executeDescribeKeyPhrasesDetectionJob(request);}

// Translation:
public virtual DescribeKeyPhrasesDetectionJobResponse DescribeKeyPhrasesDetectionJob(DescribeKeyPhrasesDetectionJobRequest request){var options = new InvokeOptions();options.RequestMarshaller = DescribeKeyPhrasesDetectionJobRequestMarshaller.Instance;options.ResponseUnmarshaller = DescribeKeyPhrasesDetectionJobResponseUnmarshaller.Instance;return Invoke<DescribeKeyPhrasesDetectionJobResponse>(request, options);}
// Original:
public LabelAndValue(String label, Number value) {this.label = label;this.value = value;}

// Translation:
public LabelAndValue(string label, int value){this.Label = label;this.Value = value;this.TypeOfValue = typeof(int);}
// Original:
public RebaseCommand setUpstreamName(String upstreamName) {if (upstreamCommit == null) {throw new IllegalStateException("setUpstreamName must be called after setUpstream."); }this.upstreamCommitName = upstreamName;return this;}

// Translation:
public virtual NGit.Api.RebaseCommand SetUpstreamName(string upstreamName){if (upstreamCommit == null){throw new InvalidOperationException("setUpstreamName must be called after setUpstream.");}this.upstreamCommitName = upstreamName;return this;}
// Original:
public SearchDashboardsResult searchDashboards(SearchDashboardsRequest request) {request = beforeClientExecution(request);return executeSearchDashboards(request);}

// Translation:
public virtual SearchDashboardsResponse SearchDashboards(SearchDashboardsRequest request){var options = new InvokeOptions();options.RequestMarshaller = SearchDashboardsRequestMarshaller.Instance;options.ResponseUnmarshaller = SearchDashboardsResponseUnmarshaller.Instance;return Invoke<SearchDashboardsResponse>(request, options);}
// Original:
public ClusterSubnetGroup createClusterSubnetGroup(CreateClusterSubnetGroupRequest request) {request = beforeClientExecution(request);return executeCreateClusterSubnetGroup(request);}

// Translation:
public virtual CreateClusterSubnetGroupResponse CreateClusterSubnetGroup(CreateClusterSubnetGroupRequest request){var options = new InvokeOptions();options.RequestMarshaller = CreateClusterSubnetGroupRequestMarshaller.Instance;options.ResponseUnmarshaller = CreateClusterSubnetGroupResponseUnmarshaller.Instance;return Invoke<CreateClusterSubnetGroupResponse>(request, options);}
// Original:
public static int endOfFooterLineKey(byte[] raw, int ptr) {try {for (;;) {final byte c = raw[ptr];if (footerLineKeyChars[c] == 0) {if (c == ':')return ptr;return -1;}ptr++;}} catch (ArrayIndexOutOfBoundsException e) {return -1;}}

// Translation:
public static int EndOfFooterLineKey(byte[] raw, int ptr){try{for (; ; ){byte c = raw[ptr];if (footerLineKeyChars[c] == 0){if (c == ':'){return ptr;}return -1;}ptr++;}}catch (IndexOutOfRangeException){return -1;}}
// Original:
public final char[] GetSuffix(int len) {char[] value = new char[len];System.arraycopy(buffer, bufferPosition - len, value, 0, len);return value;}

// Translation:
public char[] GetSuffix(int len){char[] value = new char[len];System.Array.Copy(buffer, bufferPosition - len, value, 0, len);return value;}