aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Serialization
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-13 01:03:28 +0100
committerJustin Clark-Casey (justincc)2012-07-13 01:03:28 +0100
commit884d603cac6c3fe0cdbd199e13e1514146ff82bc (patch)
tree00701964cd4053700c5f37c48c8a5196928b00d1 /OpenSim/Framework/Serialization
parentDon't cache regions data on the other unused LocalGridServiceConnector that t... (diff)
downloadopensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.zip
opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.tar.gz
opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.tar.bz2
opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.tar.xz
Rather than instantiating a UTF8 encoding everywhere when we want to supress the BOM, use a single Util.UTF8NoBomEncoding.
This class is thread-safe (as evidenced by the provision of the system-wide Encoding.UTF8 which does not suppress BOM on output).
Diffstat (limited to 'OpenSim/Framework/Serialization')
-rw-r--r--OpenSim/Framework/Serialization/TarArchiveWriter.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/OpenSim/Framework/Serialization/TarArchiveWriter.cs b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
index 122fa8e..2a3bc48 100644
--- a/OpenSim/Framework/Serialization/TarArchiveWriter.cs
+++ b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
@@ -41,8 +41,6 @@ namespace OpenSim.Framework.Serialization
41 { 41 {
42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 protected static UTF8Encoding m_utf8Encoding = new UTF8Encoding();
45
46 /// <summary> 44 /// <summary>
47 /// Binary writer for the underlying stream 45 /// Binary writer for the underlying stream
48 /// </summary> 46 /// </summary>
@@ -73,7 +71,7 @@ namespace OpenSim.Framework.Serialization
73 /// <param name="data"></param> 71 /// <param name="data"></param>
74 public void WriteFile(string filePath, string data) 72 public void WriteFile(string filePath, string data)
75 { 73 {
76 WriteFile(filePath, m_utf8Encoding.GetBytes(data)); 74 WriteFile(filePath, Util.UTF8NoBomEncoding.GetBytes(data));
77 } 75 }
78 76
79 /// <summary> 77 /// <summary>