public byte[] getByteArray() {
        return baos.toByteArray();
    }
MemJavaFileObject defines an in memory compiled Java file

@author tiwe
querydsl-codegen-utils/src/main/java/com/querydsl/codegen/utils/MemJavaFileObject.java