// 功能:重置流 public void ResetStream(SerializeType arType) { m_arType = arType; if (m_arFile == null) { m_arFile = new CSerialzieStream(arType); } m_arFile.ResetStream(arType); m_nVersion = 0; }
public void ResetStream(SerializeType arType, byte[] buffer, int nBufSize) { m_arType = arType; if (m_arFile == null) { m_arFile = new CSerialzieStream(arType, buffer, nBufSize); } else { m_arFile.ResetStream(arType, buffer, nBufSize); } m_nVersion = 0; }
public CSerialize(SerializeType arType, string szFileName) { m_arType = arType; m_szFileName = szFileName; m_nVersion = 0; if (m_arType == SerializeType.read) { if (System.IO.File.Exists(m_szFileName)) { byte[] fileData = System.IO.File.ReadAllBytes(m_szFileName); m_arFile = new CSerialzieStream(arType, fileData, fileData.Length); } else { m_arFile = new CSerialzieStream(arType, null, 0); } } else { m_arFile = new CSerialzieStream(arType); } }
public CSerialize(SerializeType arType, byte[] buffer, int nBufSize) { m_arType = arType; m_arFile = new CSerialzieStream(arType, buffer, nBufSize); m_nVersion = 0; }
public CSerialize(SerializeType arType) { m_arType = arType; m_arFile = new CSerialzieStream(arType); m_nVersion = 0; }