protected override void ParseData(byte[] chunkData) { Llista <byte> bytesAConvertir = new Llista <byte>(); Encoding encodingSource = null; long posicion = 0; while (chunkData[posicion] != NULLBYTE && chunkData.LongLength > posicion) { bytesAConvertir.Add(chunkData[posicion++]); } if (chunkData[posicion] == NULLBYTE) { keyword = Serializar.ToString(bytesAConvertir.ToTaula()); bytesAConvertir.Clear(); posicion++; //paso el Null byte if (COMPRESION != chunkData[posicion++]) //leo la compresion { throw new ChunkFormatException(); } while (chunkData.LongLength > posicion) { bytesAConvertir.Add(chunkData[posicion++]); } encodingSource = System.Text.Encoding.GetEncoding(1252); //es la unica usada... Information = Serializar.ToString(System.Text.ASCIIEncoding.Convert(encodingSource, Encoding.ASCII, bytesAConvertir.ToTaula())); } else { throw new ChunkFormatException(); } }
protected override void ParseData(byte[] chunkData) { Llista <byte> bytesAConvertir = new Llista <byte>(); long posicion = 0; while (chunkData[posicion] != NULLBYTE && chunkData.LongLength > posicion) { bytesAConvertir.Add(chunkData[posicion++]); } if (chunkData[posicion] == NULLBYTE) { keyword = Serializar.ToString(bytesAConvertir.ToTaula()); bytesAConvertir.Clear(); posicion++; //paso nullByte while (chunkData.LongLength > posicion) { bytesAConvertir.Add(chunkData[posicion++]); } Information = Serializar.ToString(System.Text.ASCIIEncoding.Convert(System.Text.Encoding.GetEncoding(1252), Encoding.ASCII, bytesAConvertir.ToTaula())); } else { throw new ChunkFormatException(); } }
public static void VaciaListaFaenas() { faenasEstaticas.Clear(); }
public void Clear() { pila.Clear(); }