• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems with NSData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with NSData


  • Subject: Problems with NSData
  • From: Frank Gibau <email@hidden>
  • Date: Thu, 6 Mar 2008 17:24:36 +0100

Hi,
We updatetd our System from 5.3 to 5.4.
Now a have a NSData Problem:

1 File file = new File(pathToObject));
2 BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file));
3 BufferedInputStream bis = new BufferedInputStream (currentPart.getInputStream());
4 int aByte;
5 while ((aByte = bis.read()) != -1) {//!= -1
6 bos.write(aByte);
7 }
8 imageFile = new NSData(currentPart.getInputStream(), aByte);


The error occured on line 8.


java.lang.ArrayIndexOutOfBoundsException
[2008-3-6 17:17:15 CET] <WorkerThread7> java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.webobjects.foundation.NSData.<init>(NSData.java:255)
at MailSearchPage.saveFile(MailSearchPage.java:888)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at KeyValueCodingProtectedAccessor.methodValue (KeyValueCodingProtectedAccessor.java:60)
at com.webobjects.foundation.NSKeyValueCoding $_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
at com.webobjects.foundation.NSKeyValueCoding $DefaultImplementation.valueForKey(NSKeyValueCoding.java:1293)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java: 1686)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey (NSKeyValueCoding.java:447)
at com.webobjects.foundation.NSKeyValueCodingAdditions $DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java: 212)
at com.webobjects.appserver.WOComponent.valueForKeyPath (WOComponent.java:1754)



What are the changes in NSData ?

Thanks Frank


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Problems with NSData
      • From: Mike Schrag <email@hidden>
  • Prev by Date: State of WO Java Client
  • Next by Date: RE: Workaround for WO 5.4 "WebAssistant: You backtracked too far"
  • Previous by thread: Re: State of WO Java Client
  • Next by thread: Re: Problems with NSData
  • Index(es):
    • Date
    • Thread