/*    */ package org.ui.debug;
/*    */ 
/*    */ import java.io.IOException;
/*    */ import java.io.OutputStream;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ConsoleWriteStream
/*    */   extends OutputStream
/*    */ {
/*    */   private Console parentConsole;
/*    */   private String streamBuffer;
/*    */   private Entry entryType;
/*    */   
/*    */   public ConsoleWriteStream(Console parentConsole, Entry entryType) {
/* 30 */     this.parentConsole = parentConsole;
/* 31 */     this.entryType = entryType;
/* 32 */     this.streamBuffer = new String();
/*    */   }
/*    */ 
/*    */   
/*    */   public void write(int b) throws IOException {
/* 37 */     this.streamBuffer = String.valueOf(this.streamBuffer) + (char)b;
/*    */   }
/*    */ 
/*    */ 
/*    */   
/*    */   public void write(byte[] b, int off, int len) throws IOException {
/* 43 */     for (int i = off; i < off + len; i++) {
/* 44 */       this.streamBuffer = String.valueOf(this.streamBuffer) + (char)b[i];
/*    */     }
/*    */     
/* 47 */     this.parentConsole.createLog(this.streamBuffer, this.entryType);
/*    */     
/* 49 */     this.streamBuffer = new String();
/*    */   }
/*    */   
/*    */   public void flush() {}
/*    */ }


/* Location:              /home/teridax/Projects/Gytebot/GYTEBOT.jar!/org/ui/debug/ConsoleWriteStream.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */