DataInputStream for Objective-C

Written on:April 26, 2013
Comments
Add One

I have been playing around with writing a Mac OS X app for stock trading. I was granted access to the trade servers API of a major online broker. The stream server API uses a data byte stream to send chunks of data for quotes. I needed this to track the live trades in real time so my app could calculate if it should buy or sell. The problem was that Objective-C does not have a good way to deal with byte data streams. Java of course has the DataInputStream and that is what everyone uses for this type of coding. Well I want to run this on my Mac. So I took the method signatures for the Java DataInputStream and created an Objective-C version that will work on both Mac OS X and iOS. I am going to attached the files and share them to the development community. If you make any changes please comment and let me know. Thanks! Have Fun coding!

DataInputStream

 

Leave a Comment