001/* 002 * This file is part of the Jikes RVM project (http://jikesrvm.org). 003 * 004 * This file is licensed to You under the Eclipse Public License (EPL); 005 * You may not use this file except in compliance with the License. You 006 * may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/eclipse-1.0.php 009 * 010 * See the COPYRIGHT.txt file distributed with this work for information 011 * regarding copyright ownership. 012 */ 013package org.mmtk.vm; 014 015import org.vmmagic.pragma.Uninterruptible; 016 017 018@Uninterruptible public abstract class Strings { 019 /** 020 * Log a message. 021 * 022 * @param c character array with message starting at index 0 023 * @param len number of characters in message 024 */ 025 public abstract void write(char [] c, int len); 026 027 /** 028 * Log a thread identifier and a message. 029 * 030 * @param c character array with message starting at index 0 031 * @param len number of characters in message 032 */ 033 public abstract void writeThreadId(char [] c, int len); 034 035 /** 036 * Copies characters from the string into the character array. 037 * Thread switching is disabled during this method's execution. 038 * <p> 039 * <b>TODO:</b> There are special memory management semantics here that 040 * someone should document. 041 * 042 * @param src the source string 043 * @param dst the destination array 044 * @param dstBegin the start offset in the destination array 045 * @param dstEnd the index after the last character in the 046 * destination to copy to 047 * @return the number of characters copied. 048 */ 049 public abstract int copyStringToChars(String src, char [] dst, 050 int dstBegin, int dstEnd); 051}