ByteBuffer byteBuffer = ByteBuffer.NEW ();

1

I have a problem with ByteBuffer byteBuffer = ByteBuffer.NEW ();

I can not understand why I do not have access to .NEW, it simply does not exist, I can not find it and can not find it ... I need it to create the logic of a PDF to JPG conversion ... Someone has an idea how you think it ??? OBS: It's for JAVA ANDROID.

    byte[] bytes;
    FileInputStream is = new FileInputStream(file);
    long length = file.length();
    bytes = new byte[(int) length];
    int offset = 0;
    int numRead = 0;
    while (offset < bytes.length
            && (numRead = is.read(bytes, offset, bytes.length
            - offset)) >= 0) {
        offset += numRead;
    }

    ByteBuffer buffer = ByteBuffer.NEW(bytes);
    String data = Base64.encodeToString(bytes, Base64.DEFAULT);
    PDFFile pdf_file = new PDFFile(buffer);
    PDFPage page = pdf_file.getPage(1);

I found this example on Google, but I can not remember where (I lost the link) ...

    
asked by anonymous 07.05.2015 / 01:02

0 answers