Hello,

I am trying to read an excel file from a network folder.  I am using standard Java DataInputStream to read the file and store the value in a byte array.  How can I declare a variable of type byte array and specify the size of this byte array?

 

function getBytesFromFile(inputPath, inputFile){
    var file = new java.io.File(inputPath, inputFile);
    var bytes = new Array;
    var dis = new java.io.DataInputStream(new java.io.FileInputStream(file));
    dis.read(bytes);
    dis.close();
    return bytes;
}

The above code does not return any value.

Standard way in java is to declare the variable like this:

byte bytes[] = new byte[(int)file.length()];

But that doesn't seem possible in ARIS script.

Thanks for any help.

Regards,

Allen 

 or register to reply.

Notify Moderator