BPM - byte array - not expected

I've got a problem when trying to compress a .xls file into a zip file in a BPM platform (BEA Aqualogic BPM - Studio). This is my code so far:

try { FileOutputStream fos = FileOutputStream(arg1 : "/home/and/Reportes/zipTest.zip"); ZipOutputStream zos = ZipOutputStream(arg1 : fos); logMessage("MAS - zippeo en: " + url); Java.Io.File file = Java.File(arg1 : url); FileInputStream fis = FileInputStream(arg1 : file); ZipEntry entry = ZipEntry(arg1 : url); zos.putNextEntry(arg1 : entry); int buff = 1024; byte[] buffer = new byte[buff]; int length; //int buffer = 1024; while((length = fis.read(buffer,0,1024)) >= 0){ zos.write(arg1 : buffer, arg2 : 0, arg3 : length); } } catch (FileNotFoundException e) { logMessage("MAS - FNFE: " + e.stackTrace); } catch (IOException e) { logMessage("MAS - IOE: " + e.stackTrace); }

What I'm getting, is a compiling error:

''byte'' not expected

And those are simple quotation marks btw (as in ' ')

Any idea as to what could it be or how to solve it?

Thanks in advance

EDIT: Also, I'm getting another error:

Argument not valid for 'arg1'. Type 'byte array' not compatible with 'Binary'

in the "fis.read" and"zos.write"

Category:java Views:2 Time:2019-03-07

Related post

  • Byte array not fully consumed 2014-03-05

    I am writing an FLV parser in Java and have come up against an issue. The program successfully parses and groups together tags into packets and correctly identifies and assigns a byte array for each tag's body based upon the BodyLength flag in the he

  • Read line from byte array (not convert byte array to string) 2009-01-29

    I have a byte array that I am reading in from a NetworkStream. The first two bytes tell the length of the packet that follows and then the packet is read into a byte array of that length. The data in that I need to read from the NetworkStream/byte ar

  • How to convert java BigDecimal to normal byte array (not 2's complement) 2011-05-29

    How do I convert from big integer to a byte array which is not in 2's complement format. Bascially I only need to convert positive numbers and do not need the sign bit. So something like 10 would become a byte 0x0a i.e-> 00001010 [Update] As per c

  • String back into byte array - not working 2011-05-30

    I have a stream that gets converted into a byte array. I then take that bye array and turn it into a string. When I try to turn that string back into a byte array it is not correct...see the code below. private void Parse(Stream stream, Encoding enco

  • How to play audio byte array (not file!) with JavaScript in a browser 2011-11-04

    For mostly security reasons, I'm not allowed to store a WAV file on the server to be accessed by a browser. What I have is a byte array contains audio data (the data portion of a WAV file I believe) on the sever, and I want it to be played on a brows

  • How can a WCF REST service receive a byte array, not a stream 2012-01-17

    I am writing a small image/video upload program using WCF REST. Ideally, I would have my service accepting a stream. But the client side developer told me that it would make his life more complicated and he would only pass me a byte array. I have no

  • Initialize byte array from a portion of existing byte array c# 2010-04-12

    Is there are an easy way to initialize byte array from portion of existing byte array. In C language it is possible to use pointer to say like char s[10] = new char[10]; char* b = s + 5; Is it possible to do that in c#, like: byte[] b = new byte[buff

  • How do I prevent WCF from auto-serializing byte-array as base-64 encoded string? 2010-10-25

    When invoking a service, my client code passes in data. One of the data members is a byte array, so WCF will automatically encode this into a base-64 string during serialization. The problem is, the data contract of the service is expecting a byte ar

  • What is proper encoding for converting a string to a byte array 2009-08-03

    I am having some sort of problem with encoding in my ASP.NET HTTPHandler, which uploads a file. The file content is passed in a hidden form variable from a ColdFusion web page which is using something called "ToBase64". In ColdFusion, the code used t

  • Converting byte array to string and back again in C# 2009-09-14

    So here's the deal: I'm trying to open a file (from bytes), convert it to a string so I can mess with some metadata in the header, convert it back to bytes, and save it. The problem I'm running into right now is with this code. When I compare the str

  • How to convert byte array into it's appropriate file format in ASP.NET MVC 2010-09-22

    I have a system that's supposed to convert a byte array (not knowing whether its pdf, txt, or doc) provided to me into a downloadable file. Now usually in ASP.NET MVC I would do it like this. return File(labTestResult.File, "application/pdf"); That's

  • read a pdf file from url to to byte array 2011-10-10

    In a xml webresponse I get a url tag which has a link to the pdf file. Example of url value is: https://www.member-data.com/files/hb/c8955fc4d6160ec0fd87f4879c6496d3.pdf). I have to convert this pdf to a byte array, how do I do this in C#? ----------

  • c# - left shift an entire byte array 2011-12-09

    In C#, is there a way to right/left shift an entire byte array (and subsequently adding a byte to a particular side for the last bit isn't lost)? I know this sounds like a weird request, but I'd still like to know if its possible and/or how to begin

  • AS3 playback of sound byte array doesn't begin at the start 2011-12-13

    I'm currently recording and storing a ByteArray of sound and then playing it back. But for some reason the playback starting position of the ByteArray is 163840, not 0 as I need it to be. Would anyone have any ideas why this might be happening? Thank

  • Writing byte array to file. Not always getting expected result 2013-06-14

    I am using Java to write a byte array to a file. When I open my file in a hex editor I am not always seeing the bytes that I expected to be there. Here is my example code and contents of the output file: public static void main(String[] args) { File

  • Dynamic Byte Array in C# by Socket Programming [List does not work] 2009-09-02

    I'm sending to a device a request as byte array and I want to receive the anwser device gives. ... Socket deviceSocket = new Socket(server); List<byte> coming = new List<byte>(); ... deviceSocket.Receive(coming) Here the program gives err

  • ByteArrayInputStream does not copy the byte array? 2011-04-05

    The Documentation on ByteArrayInputStream says : java.io.ByteArrayInputStream.ByteArrayInputStream(byte[] buf) Creates a ByteArrayInputStream so that it uses buf as its buffer array. The buffer array is not copied. The initial value of pos is 0 and t

  • Java: Is there a way to get the expected uncompressed length of a zipped byte array? 2011-05-31

    I'm using java.util.zip to compress and uncompress byte arrays, using Inflater and Deflater. Does the compressed result contain information about the expected length of the original data or do I have to store it myself? I would like to know the expec

  • Convert Byte Array to Image: Parameter is not valid 2012-01-13

    I am storing images in a database and would like to convert them from byte array to image. I have no problem converting an object to byte array but I get an error of "Parameter is not valid" when trying to convert from byte array to image. The object

  • If .net sha1 hash expects a byte array, and php sha1() wants a string, can I match the results? 2009-03-05

    I have a set of bytes I want to apply an sha1 hash to. One hash will be in .net, the other in PHP. Then I'll test to see if they match. In .net, you can create a byte array and use sha.ComputeHash(). byte[] data = new byte[DATA_SIZE]; byte[] result;

  • Byte array as an out parameter not recognized 2009-03-16

    I had a webmethod working which returned a byte array to the caller: public byte[] DownloadPDF(string URI) I had to change this to return another output (a string). So, I decided to change the method completely by now returning void and having 3 para

  • ImageConverter: Parameter is not valid for a byte array 2009-12-07

    I am sending a string formatted data of the image from an iPhone client code to a web service. I am trying to encode that in binary64 and then convert it to a byte array. I get this problem of Parameter not valid at the following point in the code. b

  • not finishing activity when passing picture of byte array taken by camera 2011-03-01

    i am using a main activity which is calling a cameraActivity and using picture taken by camera. i am finish camera activity on pictureTaken and passing byte array to parent activity protected PictureCallback jpegCallback=new PictureCallback() { publi

  • C# large byte array and memory leak if not nulled quickly 2011-11-28

    I have a class that has a byte array holding from 1,048,576 bytes up to 134,217,728 bytes. In the dispose void I have the array set to null and the method calling the dispose calls GC.Collect after that. If I dispose right away I will get my memory b

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.091 (s). 11 q(s)