package net.acomputerdog.core.java;

public class MemBuffer {
    private static final int DEFAULT_BUFFER_SIZE = 1000000;

    private static byte[] buffer = null;

    public static void createBuffer(int size) {
        if (!isAllocated()) {
            buffer = new byte[size];
        }
    }

    public static void createBuffer() {
        createBuffer(DEFAULT_BUFFER_SIZE);
    }

    public static void destroyBuffer() {
        buffer = null;
    }

    public static void freeBuffer() {
        destroyBuffer();
        System.gc();
    }

    public static void resetBuffer(int size) {
        freeBuffer();
        createBuffer(size);
    }

    public static void resetBuffer() {
        resetBuffer(DEFAULT_BUFFER_SIZE);
    }

    public static boolean isAllocated() {
        return buffer != null;
    }

    public static int getBufferSize() {
        return buffer == null ? 0 : buffer.length;
    }
}

@@ -128,23 +128,16 @@
 private 
-static 
 byte%5B%5D b
@@ -154,39 +154,32 @@
 ll;%0A%0A    public 
-static 
 void createBuffe
@@ -283,31 +283,24 @@
 %0A    public 
-static 
 void createB
@@ -366,31 +366,24 @@
 %0A    public 
-static 
 void destroy
@@ -430,31 +430,24 @@
 %0A    public 
-static 
 void freeBuf
@@ -510,39 +510,32 @@
   %7D%0A%0A    public 
-static 
 void resetBuffer
@@ -615,23 +615,16 @@
  public 
-static 
 void res
@@ -696,23 +696,16 @@
  public 
-static 
 boolean 
@@ -769,23 +769,16 @@
  public 
-static 
 int getB

Make MemBuffer non-static