Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • gitkeep
  • dev protected
  • Issue/2309-docs
  • devops-aczepiel
  • Issue/2158-emailServicedesk
  • Issue/1938-internalHandling
  • Hotfix/2097-fixTimeFormat
  • Hotfix/2087-efNet6
  • Issue/1910-MigrationtoNET6.0
  • Issue/1826-versioning
  • Sprint/2022-01
  • Hotfix/1917-vocabCheck
  • Issue/1804-fixedValueFix
  • Hotfix/xxxx-notExposedGraphs
  • Sprint/2021-23
  • Issue/1746-ApplicationProfileStoringMethod
  • Hotfix/82-updateDepsOfAPIs
  • Product/1549-speedupQuerying
  • Topic/1598-speedupQuerying
  • v3.2.3
  • v3.2.2
  • v3.2.1
  • v3.2.0
  • v3.1.2
  • v3.1.1
  • v3.1.0
  • v3.0.2
  • v3.0.1
  • v3.0.0
  • v2.2.1
  • v2.2.0
  • v2.1.1
  • v2.1.0
  • v2.0.4
  • v2.0.3
  • v2.0.2
  • v2.0.1
  • v2.0.0
  • v1.7.1
40 results

CustomUri.cs

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    OutputStreamSend.java 1.00 KiB
    import java.io.*;
    
    public class OutputStreamSend {
      public static byte[] buffer = null;
      public static int counter = 0;
    
      public OutputStreamSend(int length) {
        buffer = new byte[length];
        clear();
      }
    
      public OutputStreamSend() {
        this(128);
      }
      
      public void addtoBuffer(char v) {
          buffer[counter] = (byte)v;
          counter++;
      }
      
      public void addtoBufferN(char[] v, int len) {
            for(int i=0; i<len; i++)
            {
                buffer[counter] = (byte)v[i];
                counter++;
            }
      }
      
      public void display() {
          for(int i=0;i<counter;i++)
          {
            System.out.print(buffer[i]);
          }
      }
      
      public void clear() {
           for(int i=0;i<counter;i++)
          {
            buffer[i] = 0;
          }
          counter = 0;
      }
    
      public void send(OutputStream output) throws IOException {
          try {
            output.write(buffer,0,counter);
    		output.flush();
            this.clear();
                
          } catch (Exception e) {}
      }
    
    }