 		}
 	}
 	
-	public func read() -> String {
+	public func read () -> String {
 		let data: NSData = self.readDataToEndOfFile()
 		return NSString(data: data, encoding: streamencoding) as String
 	}
 	
-	public func lines() -> SequenceOf <String >{
+	public func lines () -> SequenceOf<String> {
 		return split(delimiter: "\n")(stream: self)
 	}
 
-	public func writeTo<Target : OutputStreamType>(inout target: Target) {
+	public func writeTo<Target : OutputStreamType> (inout target: Target) {
 		target.write(self.read())
 	}
 

	case Read, Write, ReadAndWrite
}

public func open(path: String, mode: FileMode = .Read) -> FileHandle {
	var filehandle: FileHandle?
	switch mode {
		case .Read:


extension FileHandle: ReadableStreamType {
	
	public func readSome () -> String? {
		let data: NSData = self.availableData
		if data.length == 0 {
			return nil
