Fix
This commit is contained in:
parent
371a09c60b
commit
4a4dff1973
|
@ -3,6 +3,7 @@ using System.Collections.Concurrent;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Serialization
|
namespace Emby.Server.Implementations.Serialization
|
||||||
|
@ -53,10 +54,11 @@ namespace Emby.Server.Implementations.Serialization
|
||||||
/// <param name="stream">The stream.</param>
|
/// <param name="stream">The stream.</param>
|
||||||
public void SerializeToStream(object obj, Stream stream)
|
public void SerializeToStream(object obj, Stream stream)
|
||||||
{
|
{
|
||||||
using (var writer = new XmlTextWriter(stream, null))
|
using (var writer = new StreamWriter(stream, null, IODefaults.StreamWriterBufferSize, true))
|
||||||
|
using (var textWriter = new XmlTextWriter(writer))
|
||||||
{
|
{
|
||||||
writer.Formatting = Formatting.Indented;
|
textWriter.Formatting = Formatting.Indented;
|
||||||
SerializeToWriter(obj, writer);
|
SerializeToWriter(obj, textWriter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,5 +14,10 @@ namespace MediaBrowser.Model.IO
|
||||||
/// The default file stream buffer size.
|
/// The default file stream buffer size.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const int FileStreamBufferSize = 4096;
|
public const int FileStreamBufferSize = 4096;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The default <see cref="System.IO.StreamWriter" /> buffer size.
|
||||||
|
/// </summary>
|
||||||
|
public const int StreamWriterBufferSize = 1024;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user