Index: trunk/Include/Classes/System/IO/DirectoryInfo.ab
===================================================================
--- trunk/Include/Classes/System/IO/DirectoryInfo.ab	(revision 467)
+++ trunk/Include/Classes/System/IO/DirectoryInfo.ab	(revision 468)
@@ -59,5 +59,5 @@
 			Select Case error
 				Case ERROR_ALREADY_EXISTS
-					Throw New IOException("DirectoryInfo.CreateDirectory: The directory has already existed.")
+					Exit Sub 'ディレクトリが既に存在するときは、何もしない。
 				Case Else
 					Throw New IOException("DirectoryInfo.CreateDirectory: Failed to CreateDirectory")
Index: trunk/Include/Classes/System/IO/Path.ab
===================================================================
--- trunk/Include/Classes/System/IO/Path.ab	(revision 467)
+++ trunk/Include/Classes/System/IO/Path.ab	(revision 468)
@@ -88,5 +88,9 @@
 	*/
 	Static Function GetFullPath(path As String) As String
-		Return Combine(System.Environment.CurrentDirectory, path)
+		If IsPathRooted(path) Then
+			Return path
+		Else
+			Return Combine(System.Environment.CurrentDirectory, path)
+		End If
 	End Function
 
@@ -172,10 +176,12 @@
 	Static Function GetTempPath() As String
 		Dim size = WIN32API_GetTempPath(0, 0)
-		Dim p = GC_malloc_atomic(SizeOf (TCHAR) * size) As PCTSTR
-		Dim len = WIN32API_GetTempPath(size, p)
+		Dim buf = New Text.StringBuilder(size)
+		buf.Length = size
+		Dim len = WIN32API_GetTempPath(size, StrPtr(buf))
 		If (len > size) or len = 0 Then
 			Throw New IOException("Path.GetTempPath: Failed to GetTempPath.")
 		Else
-			Return New String(p, len As Long)
+			buf.Length = len
+			Return buf.ToString
 		End If
 	End Function
@@ -209,5 +215,5 @@
 	Static Const ExtensionSeparatorChar = &H2E As StrChar
 	Static Const InvalidPathChars = Ex"\q<>|\0\t" As String
-	Static Const UniformNamingConventionString = Ex"\\\\" As String
+	Static Const UniformNamingConventionString = "\\" As String
 
 	'----------------------------------------------------------------
@@ -227,5 +233,5 @@
 		Dim i As Long
 		For i = 0 To ELM(InvalidPathChars.Length)
-			If path.Contains(InvalidPathChars.Substring(i, 1)) Then
+			If path.Contains(InvalidPathChars[i]) Then
 				Throw New IOException("Path.CheckPath: The path contains invalidPathChars.")
 			End If
Index: trunk/Include/Classes/System/IO/Stream.ab
===================================================================
--- trunk/Include/Classes/System/IO/Stream.ab	(revision 467)
+++ trunk/Include/Classes/System/IO/Stream.ab	(revision 468)
@@ -7,5 +7,6 @@
 
 Public 'Protected
-	Sub Stream():	End Sub
+	Sub Stream()
+	End Sub
 Public
 	Virtual Sub ~Stream()
@@ -54,6 +55,8 @@
 		Dispose(True)
 	End Sub
-	Virtual Function EndRead(ByRef asyncResult As System.IAsyncResult) As Long:	End Function
-	Virtual Sub EndWrite(ByRef asyncResult As System.IAsyncResult):	End Sub
+	Virtual Function EndRead(ByRef asyncResult As System.IAsyncResult) As Long
+	End Function
+	Virtual Sub EndWrite(ByRef asyncResult As System.IAsyncResult)
+	End Sub
 	Abstract Sub Flush()
 	Abstract Function Read(buffer As *Byte, offset As Long, count As Long) As Long
@@ -72,5 +75,4 @@
 	Abstract Sub SetLength(value As Int64)
 	Abstract Sub Write(buffer As *Byte, offset As Long, count As Long)
-
 	Virtual Sub WriteByte(b As Byte)
 		Write(VarPtr(b), 0, 1)
Index: trunk/Include/Classes/System/IO/StreamWriter.ab
===================================================================
--- trunk/Include/Classes/System/IO/StreamWriter.ab	(revision 467)
+++ trunk/Include/Classes/System/IO/StreamWriter.ab	(revision 468)
@@ -4,5 +4,98 @@
 	
 Class StreamWriter
-	' TODO: 実装
+	Inherits TextWriter
+Public
+	/*
+	@date 2008/02/25
+	@auther Egtra
+	*/
+	Sub StreamWriter(path As String)
+		init(New FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None))
+	End Sub
+
+	/*
+	@date 2008/02/25
+	@auther Egtra
+	*/
+	Sub StreamWriter(stream As Stream)
+		init(stream)
+	End Sub
+
+	Override Sub Write(str As String)
+		buf.Append(str)
+		Dim len = buf.Length
+		If len >= 2048 Then
+			s.Write(StrPtr(buf) As *Byte, 0, len)
+			buf.Length = 0
+		End If
+	End Sub
+
+	Override Sub Write(x As Boolean)
+		buf.Append(x)
+	End Sub
+	
+	Override Sub Write(x As Char)
+		buf.Append(x)
+	End Sub
+
+	Override Sub Write(x As Byte)
+		buf.Append(x)
+	End Sub
+#ifdef UNICODE
+	Override Sub Write(x As SByte)
+		buf.Append(x)
+	End Sub
+#else
+	Override Sub Write(x As Word)
+		buf.Append(x)
+	End Sub
+#endif
+	Override Sub Write(x As Integer)
+		buf.Append(x)
+	End Sub
+
+	Override Sub Write(x As DWord)
+		buf.Append(x)
+	End Sub
+
+	Override Sub Write(x As Long)
+		buf.Append(x)
+	End Sub
+
+	Override Sub Write(x As QWord)
+		buf.Append(x)
+	End Sub
+
+	Override Sub Write(x As Int64)
+		buf.Append(x)
+	End Sub
+
+	Override Sub Write(x As Single)
+		buf.Append(x)
+	End Sub
+
+	Override Sub Write(x As Double)
+		buf.Append(x)
+	End Sub
+
+	Override Sub Write(x As Object)
+		Write(x.ToString)
+	End Sub
+
+Protected
+	Override Sub Dispose(disposing As Boolean)
+		If disposing Then
+			s.Dispose()
+		End If
+	End Sub
+
+Private
+	Sub init(stream As Stream)
+		s = stream
+		buf = New System.Text.StringBuilder(4096)
+	End Sub
+
+	buf As Text.StringBuilder
+	s As System.IO.Stream
 End Class
 
Index: trunk/Include/Classes/System/IO/TextReader.ab
===================================================================
--- trunk/Include/Classes/System/IO/TextReader.ab	(revision 467)
+++ trunk/Include/Classes/System/IO/TextReader.ab	(revision 468)
@@ -101,5 +101,6 @@
 
 Protected
-	Abstract Sub Dispose(disposing As Boolean)
+	Virtual Sub Dispose(disposing As Boolean)
+	End Sub
 
 	/*
Index: trunk/Include/Classes/System/IO/TextWriter.ab
===================================================================
--- trunk/Include/Classes/System/IO/TextWriter.ab	(revision 468)
+++ trunk/Include/Classes/System/IO/TextWriter.ab	(revision 468)
@@ -0,0 +1,184 @@
+'Classes/System/IO/TextWriter.ab
+
+Namespace System
+Namespace IO
+
+/*
+@brief テキスト書き込みの抽象基底クラス
+@date 2007/03/05
+@auther Egtra
+*/
+Class TextWriter
+Public
+	Virtual Sub ~TextWriter()
+		Dispose(False)
+	End Sub
+
+'	Static Null = StreamWriter.Null As StreamWriter
+
+Public
+	Sub Close()
+		Dispose(True)
+	End Sub
+
+	Sub Dispose()
+		Dispose(True)
+	End Sub
+
+	Sub TextWriter()
+		newLine = Environment.NewLine
+	End Sub
+
+	Abstract Sub Write(s As String)
+	Virtual Sub Write(x As Boolean)
+		Write(Str$(x))
+	End Sub
+	
+	Virtual Sub Write(x As Char)
+		Write(Chr$(x))
+	End Sub
+
+	Virtual Sub Write(x As Byte)
+		Write(Str$(x))
+	End Sub
+#ifdef UNICODE
+	Virtual Sub Write(x As SByte)
+		Write(Str$(x))
+	End Sub
+#else
+	Virtual Sub Write(x As Word)
+		Write(Str$(x))
+	End Sub
+#endif
+	Virtual Sub Write(x As Integer)
+		Write(Str$(x))
+	End Sub
+
+	Virtual Sub Write(x As DWord)
+		Write(Str$(x))
+	End Sub
+
+	Virtual Sub Write(x As Long)
+		Write(Str$(x))
+	End Sub
+
+	Virtual Sub Write(x As QWord)
+		Write(Str$(x))
+	End Sub
+
+	Virtual Sub Write(x As Int64)
+		Write(Str$(x))
+	End Sub
+
+	Virtual Sub Write(x As Single)
+		Write(Str$(x))
+	End Sub
+
+	Virtual Sub Write(x As Double)
+		Write(Str$(x))
+	End Sub
+
+	Virtual Sub Write(x As Object)
+		Write(x.ToString)
+	End Sub
+
+	Sub WriteLine()
+		Write(newLine)
+	End Sub
+
+	Sub WriteLine(s As String)
+		Write(s)
+		WriteLine()
+	End Sub
+
+	Sub WriteLine(x As Boolean)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+	
+	Sub WriteLine(x As Char)
+		Write(Chr$(x))
+		WriteLine()
+	End Sub
+
+	Sub WriteLine(x As Byte)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+#ifdef UNICODE
+	Sub WriteLine(x As SByte)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+#else
+	Sub WriteLine(x As Word)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+#endif
+	Sub WriteLine(x As Integer)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+
+	Sub WriteLine(x As DWord)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+
+	Sub WriteLine(x As Long)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+
+	Sub WriteLine(x As QWord)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+
+	Sub WriteLine(x As Int64)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+
+	Sub WriteLine(x As Single)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+
+	Sub WriteLine(x As Double)
+		Write(Str$(x))
+		WriteLine()
+	End Sub
+
+	Sub WriteLine(x As Object)
+		Write(x.ToString)
+		WriteLine()
+	End Sub
+
+	/*
+	@brief 改行文字の設定
+	@date 2007/03/05
+	@auther Egtra
+	*/
+	Sub NewLine(n As String)
+		newLine = n
+	End Sub
+	/*
+	@brief 改行文字の取得
+	@date 2007/03/05
+	@auther Egtra
+	*/
+	Function NewLine() As String
+	End Function
+
+Protected
+	Virtual Sub Dispose(disposing As Boolean)
+	End Sub
+
+Private
+	newLine As String
+End Class
+
+End Namespace
+End Namespace
Index: trunk/Include/Classes/System/String.ab
===================================================================
--- trunk/Include/Classes/System/String.ab	(revision 467)
+++ trunk/Include/Classes/System/String.ab	(revision 468)
@@ -5,30 +5,19 @@
 #require <Classes/ActiveBasic/Strings/Strings.ab>
 
-#ifdef __STRING_IS_NOT_ALWAYS_UNICODE
-
-#ifndef UNICODE
 TypeDef StrChar = Char
-#define __STRING_IS_NOT_UNICODE
-#endif
-
-#endif
-
-#ifndef __STRING_IS_NOT_UNICODE
-TypeDef StrChar = WCHAR
 
 #ifdef UNICODE
 #define __STRING_IS_UNICODE
 #else
-#define __STRING_UNICODE_WINDOWS_ANSI
+#define __STRING_IS_NOT_UNICODE
 #endif
-#endif
 
 Namespace System
 
 	Class String
-		Implements /*IComparable, ICloneable, IConvertible, IComparable<String>, IEnumerable, IEnumerable<StrChar>, IEquatable<String>*/
+		Implements /*IComparable, ICloneable, IConvertible, IComparable<String>, IEnumerable, IEnumerable<Char>, IEquatable<String>*/
 
 		m_Length As Long
-		Chars As *StrChar
+		Chars As *Char
 
 		Sub validPointerCheck(p As VoidPtr, size = 1 As Long)
@@ -89,5 +78,5 @@
 		End Sub
 
-		Sub String(initChar As StrChar, length As Long)
+		Sub String(initChar As Char, length As Long)
 			AllocStringBuffer(length)
 			ActiveBasic.Strings.ChrFill(Chars, length, initChar)
@@ -105,9 +94,9 @@
 		End Function
 
-		Function Operator() As *StrChar
+		Function Operator() As *Char
 			Return Chars
 		End Function
 
-		Const Function Operator [] (n As Long) As StrChar
+		Const Function Operator [] (n As Long) As Char
 			rangeCheck(n)
 			Return Chars[n]
@@ -154,5 +143,5 @@
 		End Function
 
-		Const Function Operator == (y As *StrChar) As Boolean
+		Const Function Operator == (y As *Char) As Boolean
 			Return Compare(This, y) = 0
 		End Function
@@ -162,5 +151,5 @@
 		End Function
 
-		Const Function Operator <> (y As *StrChar) As Boolean
+		Const Function Operator <> (y As *Char) As Boolean
 			Return Compare(This, y) <> 0
 		End Function
@@ -170,5 +159,5 @@
 		End Function
 
-		Const Function Operator < (y As *StrChar) As Boolean
+		Const Function Operator < (y As *Char) As Boolean
 			Return Compare(This, y) < 0
 		End Function
@@ -178,5 +167,5 @@
 		End Function
 
-		Const Function Operator > (y As *StrChar) As Boolean
+		Const Function Operator > (y As *Char) As Boolean
 			Return Compare(This, y) > 0
 		End Function
@@ -186,5 +175,5 @@
 		End Function
 
-		Const Function Operator <= (y As *StrChar) As Boolean
+		Const Function Operator <= (y As *Char) As Boolean
 			Return Compare(This, y) <= 0
 		End Function
@@ -194,5 +183,5 @@
 		End Function
 
-		Const Function Operator >= (y As *StrChar) As Boolean
+		Const Function Operator >= (y As *Char) As Boolean
 			Return Compare(This, y) >= 0
 		End Function
@@ -217,13 +206,13 @@
 		End Function
 	Private
-		Static Function Compare(x As String, y As *StrChar) As Long
+		Static Function Compare(x As String, y As *Char) As Long
 			Return CompareOrdinal(x, y)
 		End Function
 
-		Static Function CompareOrdinal(x As String, y As *StrChar) As Long
+		Static Function CompareOrdinal(x As String, y As *Char) As Long
 			Return CompareOrdinal(StrPtr(x), y)
 		End Function
 
-		Static Function CompareOrdinal(x As *StrChar, y As *StrChar) As Long
+		Static Function CompareOrdinal(x As *Char, y As *Char) As Long
 			If x = 0 Then
 				If y = 0 Then
@@ -238,5 +227,5 @@
 		End Function
 
-		Static Function CompareOrdinal(x As *StrChar, indexX As Long, y As *StrChar, indexY As Long, length As Long) As Long
+		Static Function CompareOrdinal(x As *Char, indexX As Long, y As *Char, indexY As Long, length As Long) As Long
 			If x = 0 Then
 				If y = 0 Then
@@ -273,5 +262,5 @@
 		End Function
 
-		Const Function StrPtr() As *StrChar
+		Const Function StrPtr() As *Char
 			Return Chars
 		End Function
@@ -280,5 +269,5 @@
 		Sub Assign(text As PCSTR, textLengthA As Long)
 #ifdef __STRING_IS_NOT_UNICODE
-			AssignFromStrChar(text, textLengthA)
+			AssignFromCharPtr(text, textLengthA)
 #else
 			Dim textLengthW = MultiByteToWideChar(CP_THREAD_ACP, 0, text, textLengthA, 0, 0)
@@ -298,12 +287,12 @@
 			End If
 #else
-			AssignFromStrChar(text, textLengthW)
+			AssignFromCharPtr(text, textLengthW)
 #endif
 		End Sub
 
 	Private
-		Static Function ConcatStrChar(text1 As *StrChar, text1Length As Long, text2 As *StrChar, text2Length As Long) As String
-			ConcatStrChar = New String()
-			With ConcatStrChar
+		Static Function ConcatChar(text1 As *Char, text1Length As Long, text2 As *Char, text2Length As Long) As String
+			ConcatChar = New String()
+			With ConcatChar
 				.AllocStringBuffer(text1Length + text2Length)
 				ActiveBasic.Strings.ChrCopy(.Chars, text1, text1Length As SIZE_T)
@@ -315,5 +304,5 @@
 		Const Function Concat(text As PCSTR, len As Long) As String
 #ifdef __STRING_IS_NOT_UNICODE
-			Return ConcatStrChar(This.Chars, m_Length, text, len)
+			Return ConcatChar(This.Chars, m_Length, text, len)
 #else
 			With Concat
@@ -339,5 +328,5 @@
 			End With
 #else
-			Return ConcatStrChar(This.Chars, m_Length, text, len)
+			Return ConcatChar(This.Chars, m_Length, text, len)
 #endif
 		End Function
@@ -375,5 +364,5 @@
 		End Function
 
-		Const Function Contains(c As StrChar) As Boolean
+		Const Function Contains(c As Char) As Boolean
 			Return IndexOf(c) >= 0
 		End Function
@@ -389,19 +378,19 @@
 		End Function
 
-		Const Function IndexOf(c As StrChar) As Long
+		Const Function IndexOf(c As Char) As Long
 			Return indexOfCore(c, 0, m_Length)
 		End Function
 
-		Const Function IndexOf(c As StrChar, start As Long) As Long
+		Const Function IndexOf(c As Char, start As Long) As Long
 			rangeCheck(start)
 			Return indexOfCore(c, start, m_Length - start)
 		End Function
 
-		Const Function IndexOf(c As StrChar, start As Long, count As Long) As Long
+		Const Function IndexOf(c As Char, start As Long, count As Long) As Long
 			rangeCheck(start, count)
 			Return indexOfCore(c, start, count)
 		End Function
 	Private
-		Const Function indexOfCore(c As StrChar, start As Long, count As Long) As Long
+		Const Function indexOfCore(c As Char, start As Long, count As Long) As Long
 			indexOfCore = ActiveBasic.Strings.ChrFind(VarPtr(Chars[start]), count, c) As Long
 			If indexOfCore <> -1 Then
@@ -440,14 +429,14 @@
 		End Function
 
-		Const Function LastIndexOf(c As StrChar) As Long
+		Const Function LastIndexOf(c As Char) As Long
 			Return lastIndexOf(c, m_Length - 1, m_Length)
 		End Function
 
-		Const Function LastIndexOf(c As StrChar, start As Long) As Long
+		Const Function LastIndexOf(c As Char, start As Long) As Long
 			rangeCheck(start)
 			Return lastIndexOf(c, start, start + 1)
 		End Function
 
-		Const Function LastIndexOf(c As StrChar, start As Long, count As Long) As Long
+		Const Function LastIndexOf(c As Char, start As Long, count As Long) As Long
 			rangeCheck(start)
 			Dim lastFindPos = start - (count - 1)
@@ -458,5 +447,5 @@
 		End Function
 	Private
-		Const Function lastIndexOf(c As StrChar, start As Long, count As Long) As Long
+		Const Function lastIndexOf(c As Char, start As Long, count As Long) As Long
 			Dim lastFindPos = start - (count - 1)
 			Dim i As Long
@@ -504,5 +493,5 @@
 		End Function
 
-		Const Function StartsWith(c As StrChar) As Boolean
+		Const Function StartsWith(c As Char) As Boolean
 			Return IndexOf(c) = 0
 		End Function
@@ -512,5 +501,5 @@
 		End Function
 
-		Const Function EndsWith(c As StrChar) As Boolean
+		Const Function EndsWith(c As Char) As Boolean
 			Return LastIndexOf(c) = m_Length - 1
 		End Function
@@ -556,5 +545,5 @@
 		End Function
 
-		Const Function Replace(oldChar As StrChar, newChar As StrChar) As String
+		Const Function Replace(oldChar As Char, newChar As Char) As String
 			Dim sb = New Text.StringBuilder(This)
 			sb.Replace(oldChar, newChar)
@@ -604,5 +593,5 @@
 		End Function
 
-		Sub CopyTo(sourceIndex As Long, destination As *StrChar, destinationIndex As Long, count As Long)
+		Sub CopyTo(sourceIndex As Long, destination As *Char, destinationIndex As Long, count As Long)
 			ActiveBasic.Strings.ChrCopy(VarPtr(destination[destinationIndex]), VarPtr(Chars[sourceIndex]), count As SIZE_T)
 		End Sub
@@ -618,8 +607,8 @@
 
 		Function PadLeft(total As Long) As String
-			PadLeft(total, &h30 As StrChar)
-		End Function
-
-		Function PadLeft(total As Long, c As StrChar) As String
+			PadLeft(total, &h30 As Char)
+		End Function
+
+		Function PadLeft(total As Long, c As Char) As String
 			If total < 0 Then
 				Throw New ArgumentOutOfRangeException("String.PadLeft: An arguments is out of range value.", "total")
@@ -635,8 +624,8 @@
 
 		Function PadRight(total As Long) As String
-			PadRight(total, &h30 As StrChar)
-		End Function
-
-		Function PadRight(total As Long, c As StrChar) As String
+			PadRight(total, &h30 As Char)
+		End Function
+
+		Function PadRight(total As Long, c As Char) As String
 			If total < 0 Then
 				Throw New ArgumentOutOfRangeException("String.PadRight: An arguments is out of range value.", "total")
@@ -651,9 +640,9 @@
 		End Function
 	Private
-		Function AllocStringBuffer(textLength As Long) As *StrChar
+		Function AllocStringBuffer(textLength As Long) As *Char
 			If textLength < 0 Then
 				Return 0
 			End If
-			AllocStringBuffer = GC_malloc_atomic(SizeOf(StrChar) * (textLength + 1))
+			AllocStringBuffer = GC_malloc_atomic(SizeOf(Char) * (textLength + 1))
 			If AllocStringBuffer = 0 Then
 				'Throw New OutOfMemoryException
@@ -663,5 +652,5 @@
 		End Function
 
-		Sub AssignFromStrChar(text As *StrChar, textLength As Long)
+		Sub AssignFromCharPtr(text As *Char, textLength As Long)
 			AllocStringBuffer(textLength)
 			ActiveBasic.Strings.ChrCopy(Chars, text, textLength As SIZE_T)
Index: trunk/Include/Classes/System/Text/StringBuilder.ab
===================================================================
--- trunk/Include/Classes/System/Text/StringBuilder.ab	(revision 467)
+++ trunk/Include/Classes/System/Text/StringBuilder.ab	(revision 468)
@@ -40,5 +40,5 @@
 	End Function
 
-	Function Append(x As StrChar) As StringBuilder
+	Function Append(x As Char) As StringBuilder
 		EnsureCapacity(size + 1)
 		separateBuffer()
@@ -47,54 +47,52 @@
 		Return This
 	End Function
-
-#ifdef __STRING_IS_NOT_UNICODE
+#ifdef UNICODE
+	Function Append(x As SByte) As StringBuilder
+		ActiveBasic.Strings.Detail.FormatIntegerD(This, x, DWORD_MAX, 0, 0)
+		Return This
+	End Function
+#endif
+	Function Append(x As Byte) As StringBuilder
+		ActiveBasic.Strings.Detail.FormatIntegerU(This, x, DWORD_MAX, 0, 0)
+		Return This
+	End Function
+
+	Function Append(x As Integer) As StringBuilder
+		ActiveBasic.Strings.Detail.FormatIntegerD(This, x, DWORD_MAX, 0, 0)
+		Return This
+	End Function
+#ifndef UNICODE
 	Function Append(x As Word) As StringBuilder
-		Append(Str$(x As DWord))
-		Return This
-	End Function
-#else
-	Function Append(x As SByte) As StringBuilder
-		Append(Str$(x As Long))
+		ActiveBasic.Strings.Detail.FormatIntegerU(This, x, DWORD_MAX, 0, 0)
 		Return This
 	End Function
 #endif
-	
-	Function Append(x As Byte) As StringBuilder
-		Append(Str$(x As DWord))
-		Return This
-	End Function
-
-	Function Append(x As Integer) As StringBuilder
-		Append(Str$(x As Long))
-		Return This
-	End Function
-
 	Function Append(x As Long) As StringBuilder
-		Append(Str$(x))
+		ActiveBasic.Strings.Detail.FormatIntegerD(This, x, DWORD_MAX, 0, 0)
 		Return This
 	End Function
 
 	Function Append(x As DWord) As StringBuilder
-		Append(Str$(x))
+		ActiveBasic.Strings.Detail.FormatIntegerU(This, x, DWORD_MAX, 0, 0)
 		Return This
 	End Function
 
 	Function Append(x As Int64) As StringBuilder
-		Append(Str$(x))
+		ActiveBasic.Strings.Detail.FormatIntegerLD(This, x, DWORD_MAX, 0, 0)
 		Return This
 	End Function
 
 	Function Append(x As QWord) As StringBuilder
-		Append(Str$(x))
+		ActiveBasic.Strings.Detail.FormatIntegerLU(This, x, DWORD_MAX, 0, 0)
 		Return This
 	End Function
 
 	Function Append(x As Single) As StringBuilder
-		Append(Str$(x))
+		ActiveBasic.Strings.Detail.FormatFloatG(This, x, DWORD_MAX, 0, 0)
 		Return This
 	End Function
 
 	Function Append(x As Double) As StringBuilder
-		Append(Str$(x))
+		ActiveBasic.Strings.Detail.FormatFloatG(This, x, DWORD_MAX, 0, 0)
 		Return This
 	End Function
@@ -105,5 +103,5 @@
 	End Function
 
-	Function Append(c As StrChar, n As Long) As StringBuilder
+	Function Append(c As Char, n As Long) As StringBuilder
 		EnsureCapacity(size + n)
 		ActiveBasic.Strings.ChrFill(VarPtr(chars[size]), n As SIZE_T, c)
@@ -123,5 +121,5 @@
 	End Function
 
-	Function Append(s As *StrChar, startIndex As Long, count As Long) As StringBuilder
+	Function Append(s As *Char, startIndex As Long, count As Long) As StringBuilder
 		If s = 0 Then
 			If startIndex = 0 And count = 0 Then
@@ -137,5 +135,5 @@
 	End Function
 Private
-	Sub appendCore(s As *StrChar, start As Long, count As Long)
+	Sub appendCore(s As *Char, start As Long, count As Long)
 		EnsureCapacity(size + count)
 		separateBuffer()
@@ -167,5 +165,5 @@
 	End Function
 
-	Const Sub CopyTo(sourceIndex As Long, ByRef dest[] As StrChar, destIndex As Long, count As Long)
+	Const Sub CopyTo(sourceIndex As Long, ByRef dest[] As Char, destIndex As Long, count As Long)
 		If dest = 0 Then
 			Throw New ArgumentNullException("StringBuilder.CopyTo: An argument is null", "sourceIndex")
@@ -174,5 +172,5 @@
 		End If
 
-		memcpy(VarPtr(dest[destIndex]), VarPtr(chars[sourceIndex]), count * SizeOf (StrChar))
+		memcpy(VarPtr(dest[destIndex]), VarPtr(chars[sourceIndex]), count * SizeOf (Char))
 	End Sub
 
@@ -181,5 +179,5 @@
 			Throw New ArgumentOutOfRangeException("StringBuilder.Append: An argument is out of range value.", "c")
 		ElseIf c > Capacity Then
-			Dim p = GC_malloc_atomic((c + 1) * SizeOf (StrChar)) As *StrChar
+			Dim p = GC_malloc_atomic((c + 1) * SizeOf (Char)) As *Char
 			ActiveBasic.Strings.ChrCopy(p, chars, size As SIZE_T)
 			chars = p
@@ -212,5 +210,5 @@
 	End Function
 
-	Function Insert(i As Long, x As StrChar) As StringBuilder
+	Function Insert(i As Long, x As Char) As StringBuilder
 		Insert(i, VarPtr(x), 0, 1)
 		Return This
@@ -303,5 +301,5 @@
 	End Function
 
-	Function Insert(i As Long, x As *StrChar, index As Long, count As Long) As StringBuilder
+	Function Insert(i As Long, x As *Char, index As Long, count As Long) As StringBuilder
 		rangeCheck(i)
 		If x = 0 Then
@@ -342,5 +340,5 @@
 	End Function
 
-	Function Replace(oldChar As StrChar, newChar As StrChar) As StringBuilder
+	Function Replace(oldChar As Char, newChar As Char) As StringBuilder
 		replaceCore(oldChar, newChar, 0, size)
 		Return This
@@ -352,5 +350,5 @@
 	End Function
 
-	Function Replace(oldChar As StrChar, newChar As StrChar, startIndex As Long, count As Long) As StringBuilder
+	Function Replace(oldChar As Char, newChar As Char, startIndex As Long, count As Long) As StringBuilder
 		rangeCheck(startIndex, count)
 		replaceCore(oldChar, newChar, startIndex, count)
@@ -364,5 +362,5 @@
 	End Function
 Private
-	Sub replaceCore(oldChar As StrChar, newChar As StrChar, start As Long, count As Long)
+	Sub replaceCore(oldChar As Char, newChar As Char, start As Long, count As Long)
 		separateBuffer()
 		Dim i As Long
@@ -386,5 +384,5 @@
 		Dim last = start + count
 		Do
-			Dim nextPos = ActiveBasic.Strings.ChrFind(VarPtr(chars[curPos]) As *StrChar, size As SIZE_T, StrPtr(oldStr), oldStr.Length As SIZE_T) As Long
+			Dim nextPos = ActiveBasic.Strings.ChrFind(VarPtr(chars[curPos]) As *Char, size As SIZE_T, StrPtr(oldStr), oldStr.Length As SIZE_T) As Long
 			If nextPos = -1 As SIZE_T Or curPos > last Then
 				s.appendCore(chars, curPos, size - curPos)
@@ -411,9 +409,9 @@
 	End Function
 
-	Const Function Operator [](i As Long) As StrChar
+	Const Function Operator [](i As Long) As Char
 		Return Chars[i]
 	End Function
 
-	Sub Operator []=(i As Long, c As StrChar)
+	Sub Operator []=(i As Long, c As Char)
 		Chars[i] = c
 	End Sub
@@ -431,5 +429,5 @@
 	End Sub
 
-	Const Function Chars(i As Long) As StrChar
+	Const Function Chars(i As Long) As Char
 		If i >= Length Or i < 0 Then
 			Throw New IndexOutOfRangeException("StringBuilder.Chars: The index argument 'i' is out of range value.")
@@ -438,5 +436,5 @@
 	End Function
 
-	Sub Chars(i As Long, c As StrChar)
+	Sub Chars(i As Long, c As Char)
 		If i >= Length Or i < 0 Then
 			Throw New ArgumentOutOfRangeException("StringBuilder.Chars: An argument is out of range value.", "i")
@@ -452,5 +450,5 @@
 		EnsureCapacity(i) 'iが適切な値かどうかの確認はこの中で行う
 		If size < i Then
-			ActiveBasic.Strings.ChrFill(VarPtr(chars[size]), (i - size + 1) As SIZE_T, 0 As StrChar)
+			ActiveBasic.Strings.ChrFill(VarPtr(chars[size]), (i - size + 1) As SIZE_T, 0 As Char)
 		End If
 		size = i
@@ -461,5 +459,5 @@
 	End Function
 
-	Function __Chars() As *StrChar
+	Function __Chars() As *Char
 		Return chars
 	End Function
@@ -483,5 +481,5 @@
 		This.maxCapacity = maxCapacity
 		This.size = 0
-		This.chars = GC_malloc_atomic((This.capacity + 1) * SizeOf (StrChar))
+		This.chars = GC_malloc_atomic((This.capacity + 1) * SizeOf (Char))
 	End Sub
 
@@ -516,5 +514,5 @@
 	Sub separateBuffer()
 		If stringized Then
-			Dim newChars = GC_malloc_atomic(SizeOf (StrChar) * capacity) As *StrChar
+			Dim newChars = GC_malloc_atomic(SizeOf (Char) * capacity) As *Char
 			ActiveBasic.Strings.ChrCopy(newChars, chars, capacity As SIZE_T)
 			chars = newChars
@@ -523,5 +521,5 @@
 	End Sub
 
-	chars As *StrChar
+	chars As *Char
 	maxCapacity As Long
 	capacity As Long
@@ -534,5 +532,5 @@
 
 '暫定
-Function StrPtr(sb As System.Text.StringBuilder) As *StrChar
+Function StrPtr(sb As System.Text.StringBuilder) As *Char
 	Return sb.__Chars
 End Function
Index: trunk/Include/Classes/System/Xml/XmlDocument.ab
===================================================================
--- trunk/Include/Classes/System/Xml/XmlDocument.ab	(revision 467)
+++ trunk/Include/Classes/System/Xml/XmlDocument.ab	(revision 468)
@@ -136,4 +136,12 @@
 		Save( fileStream )
 	End Sub
+
+	/*!
+	@brief	指定したテキストライタにXML文書を保存する。
+	@param	テキストライタ。
+	*/
+	Virtual Sub Save( writer As System.IO.TextWriter )
+		writer.Write(InnerXmlSupportedIndent( True ))
+	End Sub
 End Class
 
Index: trunk/Include/Classes/System/misc.ab
===================================================================
--- trunk/Include/Classes/System/misc.ab	(revision 467)
+++ trunk/Include/Classes/System/misc.ab	(revision 468)
@@ -1,8 +1,3 @@
 ' Classes/System/misc.ab
-
-#ifndef __SYSTEM_MISC_AB__
-#define __SYSTEM_MISC_AB__
-
-'#require <Classes/System/Threading/WaitHandle.ab>
 
 Namespace System
@@ -36,9 +31,7 @@
 End Class
 
+Delegate Sub EventHandler(sender As Object, e As EventArgs)
+
 Delegate Sub AsyncCallback(ar As IAsyncResult)
 
-
 End Namespace 'System
-#require <Classes/System/Threading/WaitHandle.ab>
-
-#endif '__SYSTEM_MISC_AB__
