473,324 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

InputStream or RandomAccessFile.

281 100+
I have downloaded one image program and about to understand it.
This is from its documentation:
Expand|Select|Wrap|Line Numbers
  1. * image.setInput(in); // in can be InputStream or RandomAccessFile  
I run the java class from prompt: java Image me.jpg
My Q:
1. Am I right by saying that 'me.jpg' is as RandomAccessFile?
So what is InputStream here mean?
Mar 1 '07 #1
3 5355
r035198x
13,262 8TB
I have downloaded one image program and about to understand it.
This is from its documentation:
Expand|Select|Wrap|Line Numbers
  1. * image.setInput(in); // in can be InputStream or RandomAccessFile 
I run the java class from prompt: java Image me.jpg
My Q:
1. Am I right by saying that 'me.jpg' is as RandomAccessFile?
So what is InputStream here mean?
No me.jpg is the file name If you look before that line you will find where the InputStream or RandomAcces file was created.

The variable "in" is the InputStream or RandomAcces
Mar 1 '07 #2
shana07
281 100+
No me.jpg is the file name If you look before that line you will find where the InputStream or RandomAcces file was created.

The variable "in" is the InputStream or RandomAcces
From this method, I think it's InputStream isn't?
really appreciate if you could teach/give example on how to use InputStream as input.
Expand|Select|Wrap|Line Numbers
  1. private static void run(String srcName, InputStream in, Image image, boolean verbose) 
  2.  {
  3.      image.setInput(in);
  4.                ......
  5.  
  6.  
Mar 1 '07 #3
r035198x
13,262 8TB
From this method, I think it's InputStream isn't?
really appreciate if you could teach/give example on how to use InputStream as input.
Expand|Select|Wrap|Line Numbers
  1. private static void run(String srcName, InputStream in, Image image, boolean verbose) 
  2. {
  3.     image.setInput(in);
  4. ......
  5.  
  6.  
Yes it's InputStream. You already have an example on how it's being used there. Just go through it and understand it.
Mar 1 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Seong Jin, Cho | last post by:
Hi. Is there a way to get an unbuffered InputStream from Process? I found out that java.lang.Win32Process and java.lang.UNIXProcess both wraps the stdout with java.io.BufferedInputStream, but...
1
by: Charles.Deisler | last post by:
XmlTextReader requestdata = new XmlTextReader(Request.InputStream); XmlTextWriter xmltextwriter = new XmlTextWriter(somefile,someencoding); XmlTextWriter xmltextwriter2 = new...
0
by: bvasanth123 | last post by:
Hi, I would like to know how can I read an InputStream into Excel object. In my web app, user uploads MS-Excel file though asp.net html file control. I get UploadedFile.PostedFile.InputStream()...
0
by: bvasanth123 | last post by:
Hi, I would like to know how can I read an InputStream into Excel object. In my web app, user uploads MS-Excel file though asp.net html file control. I get UploadedFile.PostedFile.InputStream()...
1
by: samtilden | last post by:
I want to print out some tracing messages from Global.asax.cs/Application_BeginRequest(). I easily got: System.Web.HttpContext.Current.Request.RawUrl, and...
1
by: O.B. | last post by:
I have the need to read a file (version.txt) that is embedded within an WAR file that is within an EAR file: foo.ear contains bar.war contains resources/version.txt I am able to get the bar.ear...
2
by: jyohere | last post by:
I want to know which one will be faster randomAccessFile or Bufferedeader. I am reading a file about 18 MB. For that using randomAccessFile i will read from the beginning of the file the first time...
0
by: irkahs | last post by:
Hey all, Need some Java help here. This is a code fragment that does a few things. 1) Allows adding to a RAF file. 2) Searches for a match and displays related records. and
7
dmjpro
by: dmjpro | last post by:
Hi All .... I am trying to edit a file using RandomAccessFile. I am having a little bit problem. My file is ... i m debasis jana.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.