internal static FileBom Get(Encoding encoding) { FileBom bom = default(FileBom); boms.Get(encoding, ref bom); return(bom); }
/// <summary> /// 写入文件编码BOM /// </summary> /// <param name="writer">文件流写入器</param> /// <param name="encoding"></param> internal void WriteBom(FileStreamWriter writer, Encoding encoding) { if (encoding != null) { FileBom bom = default(FileBom); FileBom.Get(encoding, ref bom); if (bom.Length != 0) { Get(writer.bufferPool); IsWait = false; fixed(byte *bufferFixed = Buffer.Buffer) * (uint *)(bufferFixed + Buffer.StartIndex) = bom.Bom; writer.fileBufferLength = writer.openLength = bom.Length; WriteIndex += bom.Length; } } }
internal static void Get(Encoding encoding, ref FileBom bom) { boms.Get(encoding, ref bom); }
public static void Get(Encoding encoding, ref FileBom bom) { boms.Get(encoding, ref bom); }