What the Point of SharedInputStream? I can share any InputStream!

I made an InputStream called: MIMEInputStream which is a subclass of FilterInputStream. It allows me to read by line, simply by saving what it reads in a local buffer and looking for every occurrence of \n or \r\n. then returning what it found. I did a test where I used this for the first 3 lines of an input stream, then switched over to a DataInputStream and was able to read ALL data from that point onward. As far as I can tell, that's all SharedInputStreams do anyways. Yes?
My class is instantiated:
MIMEInputStream mis = new MIMEInputStream( new FileInputStream("d:\\test.mime");then when ready to switch over, i use:
DataInputStream dis = new DataInputStream(mis);and it works! So please tell me what Shared does over this?

I made an InputStream called: MIMEInputStream which is
a subclass of FilterInputStream. It allows me to read
by line, simply by saving what it reads in a local
buffer and looking for every occurrence of \n or \r\n.
then returning what it found. I did a test where I
used this for the first 3 lines of an input stream,
then switched over to a DataInputStream and was able
to read ALL data from that point onward. As far as I
can tell, that's all SharedInputStreams do anyways.
Yes?
My class is instantiated:
MIMEInputStream mis = new MIMEInputStream( new
FileInputStream("d:\\test.mime");then when ready to switch over, i use:
DataInputStream dis = new DataInputStream(mis);and it works! So please tell me what Shared does over
this?i tied something similar to your example with sockets once...
the results were unpleasant.
so i guess it depends on the kind of stream you are using. so i would suggest that the shared one is one that gives the desired functionality independent of the underlying stream source

Similar Messages

  • Whats the point of "Add Encore Chapter Marker" if I have to export it to m2v to use the sequence in

    Eh collegues there is a button on the timeline "Add Encore Chapter MArker"
    But since I have to export the entire sequence in M2V and WAV if i want to use it in enocre, then whats the point of this?
    Can i put the timeline to encore without having to export the whole project in m2v via the "File>Export>Export to encore" option?

    File, export, movie. Export as dv avi. then open encore and import as timeline.
    You can make chapter points in premiere as well, but you have to use sequence markers. when you export movie, make sure you include chapter markers under compile settings. Or you can make chapter markers in encore.

  • After 04 months of purchase of iphone 5 the lock button is too hard. At times its not working at all. The phone has been purchased in USA now I'm not getting service in India. After all whats the point in spending so much amount without any service.

    After 04 months of purchase of iphone 5 the lock button is too hard. At times its not working at all. The phone has been purchased in USA now I'm not getting service in India. After all whats the point in spending so much amount without any service.

    The warranty says that Apple may restrict service of an iPhone to the country of sale, and any reliable salesperson will tell you that if you tell them that you plan to use the iPhone in another country. Such service restrictions are common with cellphones and are by no means limited to Apple's phones.
    Sorry, but if your iPhone requires service, you will need to send it to someone you know in the US who can get it serviced and then send it back to you.
    Regards.

  • HT4722 Hi do I buy a second licence of Compressor on the app store so I can share processing. Want to use the same itunes account.

    Hi do I buy a second licence of Compressor on the app store so I can share processing. Want to use the same itunes account.

    If you're referring to distributed processing on multiple computers and if they're yours, you don't need another license. Just sign in with your account info and download C4 to the other computer.
    If that is not what ypu're referring to, please give a more complete description and perhaps someone can steer you in the right direction.
    Good luck.
    Russ

  • I just bought my MacBookPro and IMovie keeps quitting automatically when I try to finalize or share a project. It keeps telling me I do not have enough "heap room/." What should I do so I can share and burn my project ASAP?

    I just bought my MacBookPro and IMovie keeps quitting automatically when I try to finalize or share a project. It keeps telling me I do not have enough "heap room/." What should I do so I can share and burn my project ASAP?

    Hi
    How much free space is there on Your Mac main Start-Up hard disk ? for
    • SD-video - I never go under 25Gb
    • HD-material used - I guess that x5 more would do.
    Even as DVD is as standard SD-Video it needs space to scale down HD and Mac OS needs lot's for it's temp. files.
    I do not "Finalize" or use "Share to iDVD" - but I do "Share to Media Browser" and as Large (not HD or other resolution as this will degrade the final result)
    Yours Bengt W

  • Hi I went to an Apple store in sydney regarding a battery problem on my Iphone . All the think its the phone settings but my question is what the point of giving the facilities in phone if we are not suppose to use those?

    Hi I went to an Apple store in sydney regarding a battery problem on my Iphone . All the think its the phone settings but my question is what the point of giving the facilities in phone if we are not suppose to use those?

    Your question/request is incomprehensible.
    This much can be understood:
    You have an iPhone (model unknown)
    You have some sort of battery issue (exact kind unknown)
    You went to the Apple Store in Sydney (presumably, Australia)
    You did not achieve satisfaction on said visit.
    So, throw a shrimp on the barbie while you explain yourself, mate!

  • I shared more than 3000 pictures in icloud, but when I try to watch them in another device  I can only see 300. Is there a limit on the number of pictures I can share?

    I shared more than 3000 pictures in icloud, but when I try to watch them in another device  I can only see 300. Is there a limit on the number of pictures I can share?

    Quick Answer: Yes.
    If you are looking at My Photo Stream, check this out: http://support.apple.com/kb/ht4486
    How long are My Photo Stream photos stored in iCloud?
    The photos you upload to My Photo Stream are stored in iCloud for 30 days to give your devices plenty of time to connect and download them.
    How many photos are stored in My Photo Stream on my devices and computers?
    iCloud pushes all your photos to the My Photo Stream album on your devices and computers, and manages them efficiently, so you don’t run out of storage space.
    Your iOS devices keep a rolling collection of your last 1000 photos in the My Photo Stream album. From there, you can browse your recent photos or move the ones you like to your Camera Roll or another album to keep them on your device forever.
    Because your Mac and PC have more storage than your iOS devices, you can choose to have all of your My Photo Stream photos automatically downloaded. In iPhoto or Aperture preferences on your Mac, select Photos (or Photo Stream) > My Photo Stream > Automatic Import. All of your photo stream photos will be imported into your Events, Projects, Photos, Faces, and Places folders in iPhoto or Aperture. On your PC with My Photo Stream enabled in the Control Panel, all of your photos will be imported into C:\\Users\<user name>\Pictures\iCloud Photos\My Photo Stream. For iCloud Control Panel 2.0 to 2.1.2 users, the path isC:\\Users\<user name>\Pictures\Photo Stream\My Photo Stream .
    If you are using a Shared Photo Stream, check this out:
    http://support.apple.com/kb/HT5903 and http://support.apple.com/kb/HT5902
    How many photos and videos can be stored in a shared stream?
    A shared stream can hold a maximum of 5000 photos and videos combined. When you reach your limit, you must delete some photos or videos before adding new ones.
    How long are iCloud Photo Sharing photos and videos stored in iCloud?
    The photos and videos you share (and the comments or Likes associated with those photos) remain in iCloud until you or the contributor delete them manually, or until you delete the shared stream completely.

  • HT1420 Absolutely useless!!!! clicked on store to authorize my computer and I DO NO SEE "Authorize this computer" anywhere. Not going to purchase songs using itunes anymore. Whats the point when I cant transfer them.

    Absolutely useless!!!! clicked on store to authorize my computer and I DO NOT SEE "Authorize this computer" anywhere. Not going to purchase songs using itunes anymore. Whats the point when I cant transfer them.

    You are looking at the Store drop-down menu at the top of iTunes (on a PC with iTunes 11 press alt-S and the Store drop-down should appear) ? e.g.

  • I uninstalled Norton 360 under windows xp and now I'm getting this problem that firefox will no longer load pages. IE and Outlook still work and I can access the internet with them, I can ping any website I like successfully but Firefox won't load any pa

    I uninstalled Norton 360 under windows xp and now I'm getting this problem that firefox will no longer load pages. IE and Outlook still work and I can access the internet with them, I can ping any website I like successfully but Firefox won't load any pages ... N
    == This happened ==
    Every time Firefox opened
    == I uninstalled Norton 360 ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; Media Center PC 4.0; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

    I found a fix for this, not only firefox but several other networking programs were broken as well (Outlook and IE were ok for some reason) so I reasoned that the Norton uninstall was incomplete somehow - I had done it from the add/remove programs in the control panel. Sure enough that's not enough to release Norton's tentacles in your system, there's an uninstall tool on their website (a whole set of them actually) that managed to carve it out completely and after a restart everything was back to normal. My machines will definitely be Norton-free from now on ... N

  • My MacBook Pro Core Duo from 2006 shuts down randomly requiring frequent reboots to the point I had to abandon doing any project or anything on this MacBook Pro. Same thing occurs with the iMac dual core from 2007. MacBook battery replaced.

    My MacBook Pro Core Duo from 2006 shuts down randomly requiring frequent reboots to the point I had to abandon doing any project or anything on this MacBook Pro. Same thing occurs with the iMac dual core from 2007. MacBook battery replaced. Is it internal battery for both, new logic board required, bad hard drive, or bad RAM?
    Help.

    Run an Apple Hardware Test using the original installation disk that has the AHT instructions on it.
    Try SMC and PRAM resets:
    http://support.apple.com/kb/ht3964
    http://support.apple.com/kb/ht1379
    It is possible that you may need a new PRAM battery.
    Ciao.

  • My iPad was hacked through Words With Friends. Suddenly the tiles change and the points quadruple and I can't get control of the game.  I deleted the app, but how can I make sure the virus hacker is gone?

    iPad hacked from Words With Friends. Game suddenly appears in control.  Not responsive. Suddenly my tiles change, then the points quadruple. I deleted the app, but would really like to continue playing with my family.  How can I get rid of this hacker and or virus on my iPad?

    Since it has happened previously, it is likely someone you know or who has access to your systems, or has access to recovery information with that game vendor. I seem to recall that vendor being called out for account security issues in the past, but can't say for sure.On the other hand, the symptoms you describe do not necessarily mean you have been "hacked", could be just that something is amiss with the app.
    You may wish to reach to the app vendor and see what sort of support it offers.

  • Whats the point of Photos if you don't use the cloud?

    I find iPhoto useful as quick reference library for my images. Most of the time I use Lightroom & Photoshop, but iPhoto and Aperture have their uses. Given my experience of the apallingly poor (virtually non-existant) synchronisation using iCloud with Pages, Numbers and Keynote that I have experienced over the past few months despite repeatably checking that I have the latest versions etc. I will NEVER store my images on someone else's servers. To that end, what is the point of Photos?
    I own a number of 2TB & 3TB hard drives which store my images and backup reliably and which I have already paid for. Why would I want to pay Apple to store yet more copies and suffer the inevitable loss of control over retrieving them, which is what I have experienced with Pages, Numbers and Keynote.
    As regards synchronising with all my devices - no thanks. I can easily copy images to my iPad via iTunes. No doubt Apple will remove this option at some point to force us to rent space on the Cloud. When that happens I will abandon Apple totally. You have been warned Apple execs!

    What I don't understand is your comment that you use iPhoto as a quick reference library for your photos? Why would you not use Lightroom for that purpose - a much better photo management tool than iPhoto is.
    As to why you would use Photos - again it would depend on your answer to the above question. The same way you import your photos into iPhoto you can import them into Photos and use it as a "quick reference tool". And you don't have to enable iCloud Photo Library, just keep your photos on your own computer/drives. I don't use iPhoto (my wife did) and I used Aperture and Pixelmator (a Photoshop-lite alternative). I plan on using Photos (and the iCloud Photo Library) to the photos that my wife and I take with our iPhones (and the ones we decide to save from Facebook) mainly. I occasionally will add some photos from Aperture (or Lightroom when I get around to migrating to that from Aperture) that my wife wants access to.

  • Whats the point of converting to a different format.

    I recently learned I can convert all my music to any format and bit rate I want with iTunes. I converted 1 song 3 times into the same format (MP3) but a different bit rate each (128, 224, 320). When I converted each one I kept all the other settings the same, only changing bit rate. I listen to each format of the song with iTunes, and they all sounded like they had the same quality. So I hooked up my head phones (since they pick up everything), and they still all sounded the same. Then I thought, maybe iTunes plays all of its music in the format that I have the converter set to. Last, I put all three of my songs on a MP3 player. When listening to each one of them through the MP3 player, they all still sound the same. What is the point of having the option to change the bit rate, if they seem to have the same quality, except for making the file take up more hard drive space.

    Thank you guys, I was wondering why what I thought, seemed to not line up with what was going on. Just so I know I understand, wheather I import a song off a cd, or buy a song digitally. What quality they are in, can not be changed, you can only change the size of it? Say I download a song that is 320kbps and convert it to 128kbps. Of course, the size drops significantly,. but there really is no difference in the listening quality?
    I have many songs that are 128 kbps and above, and they all sound good enough for me. I also have a song that is (i think) 86kbps, and not so much the quality as it is the loudness, is low. I have to turn everything up as high as I can to make it sound good. If the bitrate really only messes with the size, why is it that the 86 kbps song I have is so low with sound?
    The way it sounds, is that I should always, always get the highest quality song that I can. Then, use the converter to take the song with good quality, and make it have a lower bit rate simply for space?
    Through all the songs I've ever had, the bitrate (for me) was a good way of telling the quality of the song(I thought was the same thing). It seemed like when i get music, for the most part, the higher the bitrate was the better the quality was. Kind of like that 86kbps song, low bitrate is equaling low sound. Listening to a song can give you a good idea what the quality of the song is, compaired to another. But say i go to get the best quality of my music. and then convert them to smaller files. Is there a solid way to tell a song is good quality and not just converted to a higher bitrate except for listening to them?
    Sorry for all the questions, I'm a noob when it comes to the quality of music. Thank you for all your replies.

  • Is there a flash drive for the iPhone 5 so I can share

    Is there a flash drive for the iPhone 5 that I can plug into my phone, copy all of the hundreds of photos and videos I've taken of my baby nephew using the iPhone camera to, and then pull out so I can just give the drive to my sister? Downloading/transferring all those photos and videos to my computer, then emailing or sorting and burning them to a disc would take FOREVER. The photos and videos of the baby are all mixed in with my personal photos and videos I've taken and sorting them out would be a nightmare. Plus, I want the original photos and videos to remain on my camera even after I copy them for my sister. Any help/ideas would be most appreciated!

    Hi Allan,
    Thank you for responding.
    One clarification: I agree that the iPhone is not for long-term photo storage and I'm not looking to use it that way. What I'm looking for is a quick and easy way for me to get the photos/videos of my nephew to my sister so SHE can store them long-term. (Then I can delete all but a few of them and transfer them to my computer for storage pretty quickly and easily). The way I know to get all those photos/videos to her would take a very long time (which I don't have) and would require a lot of time sorting (which I don't have time to do either). Please don't suggest I pare down the photos and videos for her. This baby is a miracle baby and the Mom needs to get all the photos and videos. Understand where I'm coming from?
    Regarding not keeping any favorite photos/videos on an iPhone: It seems normal to have some favorite photos and videos remain on an iPhone, kind of like a "Grandma's brag book" of most beloved photos. Even the most no-nonsense person might have 20-30 photos of someone or something they love, so they can share them with interested people or peruse them when they want to feel connected or be grounded.
    I can't be the only person dealing with this issue/needing this type of hardware. Opportunities and need for photo sharing abound. If nothing else, it seems like an easy way for Apple to make a whole lot of extra money while making a whole lot of consumers very, very happy.
    Any advice? Again, thanks very much.

  • "Transferring purchases" Whats the point?

    When I sync my iPhone to my macbook, it takes quite a while, and it appears that most of the time is spent "transfering purchases." It spends all this time transferring apps to my mac. Is this just my app data or is it the entire application? If its just the app data, that should be a really quick process I would imagine. Also, app data is backed up as part of the "backup" process, either through wifi or via the separate backup this phone option. If its the entire app, then what is the point? I can't execute ios apps on my laptop, and if my phone gets erased, why couldn't it just automatically re-download all of the apps I previously had installed when I put my Apple ID back in and the phone can see what apps I previously had installed on my device? Seems like a waste of time to me.
    I can understand letting itunes know which songs/books/videos/tv shows, etc. that I purchased on my phone, so that I can download them on my computer also, but that still wouldn't require downloading the actual data, and it wouldn't have to wait until a sync session to do that. Both the phone and itunes on the computer are listening to Apple's servers based on your Apple ID for information on what media you've purchased.
    So bottom line is what is the point of downloading ios apps to the computer?

    If you have a lot of Apps, it's certianly easier to add them to the iPhone via iTunes than it is to re-download them from the App Store.

Maybe you are looking for

  • Mail app no longer "speaks" English

    Opened my Mail app today...and it was in Chinese!? My International System Pref listed Chinese second to English. When I made Danish a second choice, the Mail app opened in Danish. The Language list in the Get Info window for the Mail app no longer l

  • Why can't I create a POP account?

    I wanted to change an IMAP mail account to POP. I thought I knew how to do it. I saved all my messages to different folders on my Mac. I then deleted the IMAP account. I went to Accounts in Preferences and clicked to create a new account. I filled in

  • Agent reports SCAN listeners incorrectly

    I an running Enterprise Manager 12.1.0.3 and the agents in question have been upgraded to 12.1.0.3 agents. On a two node cluster, node names are Aporia & Lepisma the OEM console is not reporting the scan listeners correctly. There are three scan list

  • VGA adapter trouble

    Hello, folks. I have a MacBook Pro with OS X 10.9.2. Last year, I used a VGA adapter without problems to connect the notebook to a data show. However, in the past few weeks I have twice tried to connect it to other data shows, with no luck. I select

  • Can someone help me understand what the measurement em stands for?

    I have been running into the measurement em (or is it en) and I cannot find an explanation as to what it means. Can someone explain it to me with an example or two? Thank you Allen Macfalda