< prev index next >

src/hotspot/share/utilities/utf8.hpp

Print this page

@@ -88,31 +88,31 @@
  public:
   // checks if the given unicode character can be encoded as latin1
   static bool is_latin1(jchar c);
 
   // checks if the given string can be encoded as latin1
-  static bool is_latin1(jchar* base, int length);
+  static bool is_latin1(const jchar* base, int length);
 
   // returns the utf8 size of a unicode character
   static int utf8_size(jchar c);
   static int utf8_size(jbyte c);
 
   // returns the utf8 length of a unicode string
-  template<typename T> static int utf8_length(T* base, int length);
+  template<typename T> static int utf8_length(const T* base, int length);
 
   // converts a unicode string to utf8 string
   static void convert_to_utf8(const jchar* base, int length, char* utf8_buffer);
 
   // converts a unicode string to a utf8 string; result is allocated
   // in resource area unless a buffer is provided. The unicode 'length'
   // parameter is set to the length of the result utf8 string.
-  template<typename T> static char* as_utf8(T* base, int& length);
-  static char* as_utf8(jchar* base, int length, char* buf, int buflen);
-  static char* as_utf8(jbyte* base, int length, char* buf, int buflen);
+  template<typename T> static char* as_utf8(const T* base, int& length);
+  static char* as_utf8(const jchar* base, int length, char* buf, int buflen);
+  static char* as_utf8(const jbyte* base, int length, char* buf, int buflen);
 
   // returns the quoted ascii length of a unicode string
-  template<typename T> static int quoted_ascii_length(T* base, int length);
+  template<typename T> static int quoted_ascii_length(const T* base, int length);
 
   // converts a unicode string to quoted ascii
   template<typename T> static void as_quoted_ascii(const T* base, int length, char* buf, int buflen);
 };
 
< prev index next >