aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorMelanie2009-10-04 05:49:16 +0100
committerMelanie2009-10-04 05:49:16 +0100
commit6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6 (patch)
tree7e786c0ce436f42a60806629f3249658eab4884a /OpenSim/Framework/Util.cs
parentSlightly better message with status code for WebException. (diff)
parentClosing another stream. (diff)
downloadopensim-SC-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.zip
opensim-SC-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.tar.gz
opensim-SC-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.tar.bz2
opensim-SC-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.tar.xz
Merge branch 'diva-textures-osgrid'
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 17fc58c..0851d26 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -103,6 +103,8 @@ namespace OpenSim.Framework
103 } 103 }
104 104
105 105
106 public static Encoding UTF8 = Encoding.UTF8;
107
106 /// <value> 108 /// <value>
107 /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards) 109 /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards)
108 /// </value> 110 /// </value>
@@ -465,7 +467,7 @@ namespace OpenSim.Framework
465 output.Append(": "); 467 output.Append(": ");
466 } 468 }
467 469
468 output.Append(CleanString(Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1))); 470 output.Append(CleanString(Util.UTF8.GetString(bytes, 0, bytes.Length - 1)));
469 } 471 }
470 else 472 else
471 { 473 {
@@ -826,7 +828,7 @@ namespace OpenSim.Framework
826 828
827 public static string Compress(string text) 829 public static string Compress(string text)
828 { 830 {
829 byte[] buffer = Encoding.UTF8.GetBytes(text); 831 byte[] buffer = Util.UTF8.GetBytes(text);
830 MemoryStream memory = new MemoryStream(); 832 MemoryStream memory = new MemoryStream();
831 using (GZipStream compressor = new GZipStream(memory, CompressionMode.Compress, true)) 833 using (GZipStream compressor = new GZipStream(memory, CompressionMode.Compress, true))
832 { 834 {
@@ -860,7 +862,7 @@ namespace OpenSim.Framework
860 decompressor.Read(buffer, 0, buffer.Length); 862 decompressor.Read(buffer, 0, buffer.Length);
861 } 863 }
862 864
863 return Encoding.UTF8.GetString(buffer); 865 return Util.UTF8.GetString(buffer);
864 } 866 }
865 } 867 }
866 868
@@ -1132,7 +1134,7 @@ namespace OpenSim.Framework
1132 { 1134 {
1133 byte[] data = new byte[length]; 1135 byte[] data = new byte[length];
1134 stream.Read(data, 0, length); 1136 stream.Read(data, 0, length);
1135 string strdata = Encoding.UTF8.GetString(data); 1137 string strdata = Util.UTF8.GetString(data);
1136 OSDMap args = null; 1138 OSDMap args = null;
1137 OSD buffer; 1139 OSD buffer;
1138 buffer = OSDParser.DeserializeJson(strdata); 1140 buffer = OSDParser.DeserializeJson(strdata);