Files
27Aug2021-Cpp2IL-Dump/mscorlib/System/IO/BinaryWriter.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

358 lines
18 KiB
C#

using System;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Text;
using Cpp2IlInjected;
namespace System.IO
{
/// <summary>Writes primitive types in binary to a stream and supports writing strings in a specific encoding.</summary>
// Token: 0x02000282 RID: 642
[Token(Token = "0x2000282")]
[ComVisible(true)]
[Serializable]
public class BinaryWriter : IDisposable
{
/// <summary>Initializes a new instance of the <see cref="T:System.IO.BinaryWriter" /> class that writes to a stream.</summary>
// Token: 0x0600173E RID: 5950 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600173E")]
[Address(RVA = "0x2BA4C30", Offset = "0x2BA3C30", VA = "0x182BA4C30")]
protected BinaryWriter()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.IO.BinaryWriter" /> class based on the specified stream and using UTF-8 encoding.</summary>
/// <param name="output">The output stream.</param>
/// <exception cref="T:System.ArgumentException">The stream does not support writing or is already closed.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="output" /> is <see langword="null" />.</exception>
// Token: 0x0600173F RID: 5951 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600173F")]
[Address(RVA = "0x2BA4BB0", Offset = "0x2BA3BB0", VA = "0x182BA4BB0")]
public BinaryWriter(Stream output)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.IO.BinaryWriter" /> class based on the specified stream and character encoding.</summary>
/// <param name="output">The output stream.</param>
/// <param name="encoding">The character encoding to use.</param>
/// <exception cref="T:System.ArgumentException">The stream does not support writing or is already closed.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="output" /> or <paramref name="encoding" /> is <see langword="null" />.</exception>
// Token: 0x06001740 RID: 5952 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001740")]
[Address(RVA = "0x2BA4B90", Offset = "0x2BA3B90", VA = "0x182BA4B90")]
public BinaryWriter(Stream output, Encoding encoding)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.IO.BinaryWriter" /> class based on the specified stream and character encoding, and optionally leaves the stream open.</summary>
/// <param name="output">The output stream.</param>
/// <param name="encoding">The character encoding to use.</param>
/// <param name="leaveOpen">
/// <see langword="true" /> to leave the stream open after the <see cref="T:System.IO.BinaryWriter" /> object is disposed; otherwise, <see langword="false" />.</param>
/// <exception cref="T:System.ArgumentException">The stream does not support writing or is already closed.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="output" /> or <paramref name="encoding" /> is <see langword="null" />.</exception>
// Token: 0x06001741 RID: 5953 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001741")]
[Address(RVA = "0x2BA4A30", Offset = "0x2BA3A30", VA = "0x182BA4A30")]
public BinaryWriter(Stream output, Encoding encoding, bool leaveOpen)
{
}
/// <summary>Closes the current <see cref="T:System.IO.BinaryWriter" /> and the underlying stream.</summary>
// Token: 0x06001742 RID: 5954 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001742")]
[Address(RVA = "0x2BA3AB0", Offset = "0x2BA2AB0", VA = "0x182BA3AB0", Slot = "5")]
public virtual void Close()
{
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.IO.BinaryWriter" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">
/// <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
// Token: 0x06001743 RID: 5955 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001743")]
[Address(RVA = "0x2BA3AD0", Offset = "0x2BA2AD0", VA = "0x182BA3AD0", Slot = "6")]
protected virtual void Dispose(bool disposing)
{
}
/// <summary>Releases all resources used by the current instance of the <see cref="T:System.IO.BinaryWriter" /> class.</summary>
// Token: 0x06001744 RID: 5956 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001744")]
[Address(RVA = "0x2BA3AB0", Offset = "0x2BA2AB0", VA = "0x182BA3AB0", Slot = "4")]
public void Dispose()
{
}
/// <summary>Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.</summary>
// Token: 0x06001745 RID: 5957 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001745")]
[Address(RVA = "0x493A40", Offset = "0x492A40", VA = "0x180493A40", Slot = "7")]
public virtual void Flush()
{
}
/// <summary>Writes a one-byte <see langword="Boolean" /> value to the current stream, with 0 representing <see langword="false" /> and 1 representing <see langword="true" />.</summary>
/// <param name="value">The <see langword="Boolean" /> value to write (0 or 1).</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06001746 RID: 5958 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001746")]
[Address(RVA = "0x2BA3FF0", Offset = "0x2BA2FF0", VA = "0x182BA3FF0", Slot = "8")]
public virtual void Write(bool value)
{
}
/// <summary>Writes an unsigned byte to the current stream and advances the stream position by one byte.</summary>
/// <param name="value">The unsigned byte to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06001747 RID: 5959 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001747")]
[Address(RVA = "0xAC4CC0", Offset = "0xAC3CC0", VA = "0x180AC4CC0", Slot = "9")]
public virtual void Write(byte value)
{
}
/// <summary>Writes a signed byte to the current stream and advances the stream position by one byte.</summary>
/// <param name="value">The signed byte to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06001748 RID: 5960 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001748")]
[Address(RVA = "0xAC4CC0", Offset = "0xAC3CC0", VA = "0x180AC4CC0", Slot = "10")]
[CLSCompliant(false)]
public virtual void Write(sbyte value)
{
}
/// <summary>Writes a byte array to the underlying stream.</summary>
/// <param name="buffer">A byte array containing the data to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is <see langword="null" />.</exception>
// Token: 0x06001749 RID: 5961 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001749")]
[Address(RVA = "0x2BA4880", Offset = "0x2BA3880", VA = "0x182BA4880", Slot = "11")]
public virtual void Write(byte[] buffer)
{
}
/// <summary>Writes a region of a byte array to the current stream.</summary>
/// <param name="buffer">A byte array containing the data to write.</param>
/// <param name="index">The index of the first byte to read from <paramref name="buffer" /> and to write to the stream.</param>
/// <param name="count">The number of bytes to read from <paramref name="buffer" /> and to write to the stream.</param>
/// <exception cref="T:System.ArgumentException">The buffer length minus <paramref name="index" /> is less than <paramref name="count" />.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> or <paramref name="count" /> is negative.</exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x0600174A RID: 5962 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600174A")]
[Address(RVA = "0x2358F30", Offset = "0x2357F30", VA = "0x182358F30", Slot = "12")]
public virtual void Write(byte[] buffer, int index, int count)
{
}
/// <summary>Writes a Unicode character to the current stream and advances the current position of the stream in accordance with the <see langword="Encoding" /> used and the specific characters being written to the stream.</summary>
/// <param name="ch">The non-surrogate, Unicode character to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="ch" /> is a single surrogate character.</exception>
// Token: 0x0600174B RID: 5963 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600174B")]
[Address(RVA = "0x2BA4740", Offset = "0x2BA3740", VA = "0x182BA4740", Slot = "13")]
public virtual void Write(char ch)
{
}
/// <summary>Writes a character array to the current stream and advances the current position of the stream in accordance with the <see langword="Encoding" /> used and the specific characters being written to the stream.</summary>
/// <param name="chars">A character array containing the data to write.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="chars" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
// Token: 0x0600174C RID: 5964 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600174C")]
[Address(RVA = "0x2BA3E80", Offset = "0x2BA2E80", VA = "0x182BA3E80", Slot = "14")]
public virtual void Write(char[] chars)
{
}
/// <summary>Writes an eight-byte floating-point value to the current stream and advances the stream position by eight bytes.</summary>
/// <param name="value">The eight-byte floating-point value to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x0600174D RID: 5965 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600174D")]
[Address(RVA = "0x2BA3FA0", Offset = "0x2BA2FA0", VA = "0x182BA3FA0", Slot = "15")]
public virtual void Write(double value)
{
}
/// <summary>Writes a two-byte signed integer to the current stream and advances the stream position by two bytes.</summary>
/// <param name="value">The two-byte signed integer to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x0600174E RID: 5966 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600174E")]
[Address(RVA = "0x2BA3C30", Offset = "0x2BA2C30", VA = "0x182BA3C30", Slot = "16")]
public virtual void Write(short value)
{
}
/// <summary>Writes a two-byte unsigned integer to the current stream and advances the stream position by two bytes.</summary>
/// <param name="value">The two-byte unsigned integer to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x0600174F RID: 5967 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600174F")]
[Address(RVA = "0x2BA3BA0", Offset = "0x2BA2BA0", VA = "0x182BA3BA0", Slot = "17")]
[CLSCompliant(false)]
public virtual void Write(ushort value)
{
}
/// <summary>Writes a four-byte signed integer to the current stream and advances the stream position by four bytes.</summary>
/// <param name="value">The four-byte signed integer to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06001750 RID: 5968 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001750")]
[Address(RVA = "0x2BA4060", Offset = "0x2BA3060", VA = "0x182BA4060", Slot = "18")]
public virtual void Write(int value)
{
}
/// <summary>Writes a four-byte unsigned integer to the current stream and advances the stream position by four bytes.</summary>
/// <param name="value">The four-byte unsigned integer to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06001751 RID: 5969 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001751")]
[Address(RVA = "0x2BA4310", Offset = "0x2BA3310", VA = "0x182BA4310", Slot = "19")]
[CLSCompliant(false)]
public virtual void Write(uint value)
{
}
/// <summary>Writes an eight-byte signed integer to the current stream and advances the stream position by eight bytes.</summary>
/// <param name="value">The eight-byte signed integer to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06001752 RID: 5970 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001752")]
[Address(RVA = "0x2BA3CC0", Offset = "0x2BA2CC0", VA = "0x182BA3CC0", Slot = "20")]
public virtual void Write(long value)
{
}
/// <summary>Writes an eight-byte unsigned integer to the current stream and advances the stream position by eight bytes.</summary>
/// <param name="value">The eight-byte unsigned integer to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06001753 RID: 5971 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001753")]
[Address(RVA = "0x2BA4150", Offset = "0x2BA3150", VA = "0x182BA4150", Slot = "21")]
[CLSCompliant(false)]
public virtual void Write(ulong value)
{
}
/// <summary>Writes a four-byte floating-point value to the current stream and advances the stream position by four bytes.</summary>
/// <param name="value">The four-byte floating-point value to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06001754 RID: 5972 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001754")]
[Address(RVA = "0x2BA3F50", Offset = "0x2BA2F50", VA = "0x182BA3F50", Slot = "22")]
public virtual void Write(float value)
{
}
/// <summary>Writes a length-prefixed string to this stream in the current encoding of the <see cref="T:System.IO.BinaryWriter" />, and advances the current position of the stream in accordance with the encoding used and the specific characters being written to the stream.</summary>
/// <param name="value">The value to write.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="value" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06001755 RID: 5973 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001755")]
[Address(RVA = "0x2BA4400", Offset = "0x2BA3400", VA = "0x182BA4400", Slot = "23")]
public virtual void Write(string value)
{
}
/// <summary>Writes a 32-bit integer in a compressed format.</summary>
/// <param name="value">The 32-bit integer to be written.</param>
/// <exception cref="T:System.IO.EndOfStreamException">The end of the stream is reached.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
/// <exception cref="T:System.IO.IOException">The stream is closed.</exception>
// Token: 0x06001756 RID: 5974 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001756")]
[Address(RVA = "0x2BA3B30", Offset = "0x2BA2B30", VA = "0x182BA3B30")]
protected void Write7BitEncodedInt(int value)
{
}
/// <summary>Specifies a <see cref="T:System.IO.BinaryWriter" /> with no backing store.</summary>
// Token: 0x04000C83 RID: 3203
[Token(Token = "0x4000C83")]
public static readonly BinaryWriter Null;
/// <summary>Holds the underlying stream.</summary>
// Token: 0x04000C84 RID: 3204
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4000C84")]
protected Stream OutStream;
// Token: 0x04000C85 RID: 3205
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4000C85")]
private byte[] _buffer;
// Token: 0x04000C86 RID: 3206
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4000C86")]
private Encoding _encoding;
// Token: 0x04000C87 RID: 3207
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4000C87")]
private Encoder _encoder;
// Token: 0x04000C88 RID: 3208
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4000C88")]
[OptionalField]
private bool _leaveOpen;
// Token: 0x04000C89 RID: 3209
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4000C89")]
[OptionalField]
private char[] _tmpOneCharBuffer;
// Token: 0x04000C8A RID: 3210
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x4000C8A")]
private byte[] _largeByteBuffer;
// Token: 0x04000C8B RID: 3211
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
[Token(Token = "0x4000C8B")]
private int _maxChars;
// Token: 0x04000C8C RID: 3212
[Token(Token = "0x4000C8C")]
private const int LargeByteBufferSize = 256;
}
}