Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > C# to Java

Reply
Thread Tools

C# to Java

 
 
J M
Guest
Posts: n/a
 
      10-18-2004
I am manually porting C# program to Java

How do I write following C# function in java
using(MemoryStream memStream=new MemoryStream())

TIA!


 
Reply With Quote
 
 
 
 
Thomas Fritsch
Guest
Posts: n/a
 
      10-18-2004
J M wrote:
> I am manually porting C# program to Java
>
> How do I write following C# function in java
> using(MemoryStream memStream=new MemoryStream())
>
> TIA!


Don't know C#, but my guess is ByteArrayOutputStream or
ByteArrayInputStream. See
<http://java.sun.com/j2se/1.4.2/docs/api/java/io/package-summary.html>

--
Thomas<dot>Fritsch<squiggle>ops<dot>de

 
Reply With Quote
 
 
 
 
Mike Schilling
Guest
Posts: n/a
 
      10-18-2004

"J M" <> wrote in message
news:FVOcd.7334$q% m...
>I am manually porting C# program to Java
>
> How do I write following C# function in java
> using(MemoryStream memStream=new MemoryStream())


There's no Java class corresponding precisely to MemoryStream:
ByteArrayInputStream and ByteArrayOutputStream are the closest.

using(x) translates, more or less, to

// declare x;
try
{
// body of using statement
}
finally
{
// dispose of x in some class-specific fashion.
// in the case, probably x.close();
}


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hot Requirements: 1.Sr Java Developer,2.Java Developer (Java with EJB) Isaac Java 0 01-20-2011 08:41 PM
hey i am just started java,, can anyone tell me the use ,application, why java , importance of java.. manish sahu Java 3 02-14-2008 12:00 AM
[JAVA] [EVALUATION] - The Java Failure (Sorry: The Java(tm) Failure) Ilias Lazaridis Java 0 02-01-2005 10:32 AM
JAVA VIRTUAL MUCHINE OR SUN JAVA Fernando Kohan Firefox 1 11-14-2004 02:04 AM
Job to convert Java App 1.3.1 to Java Newest of Java Michael Kintner Java 0 11-30-2003 04:42 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57