Microsoft KB Archive/819600

= BUG: Help topic for the java.io.PipedOutputStream class is not correct in Visual Studio .NET or in Visual Studio 2005 =

Article ID: 819600

Article Last Modified on 11/26/2007

-

APPLIES TO


 * Microsoft Visual J++ 6.0 Standard Edition
 * Microsoft Visual C# 2005 Express Edition
 * Microsoft Visual C# .NET 2003 Standard Edition
 * Microsoft Visual C# .NET 2002 Standard Edition
 * Microsoft Visual J++ 1.0 Standard Edition

-





SYMPTOMS
You have a Visual J++ project with a class that uses the java.io.PipedOutputStream object. When you convert your Visual J++ project to a Visual C# .NET project by using the Java Language Conversion Assistant (JLCA), the java.io.PipedOutputStream object is not converted completely in the Visual C# .NET or in Visual C# 2005 code that is generated. When you open the Microsoft Visual Studio .NET or Microsoft Visual Studio 2005 Help topic that is listed in the UPGRADE_ISSUE comment, the java.io.PipedOutputStream class is listed as System.IO.StreamReader in the Help topic. This is not correct.

The content in the Microsoft Help topic at ms-help://MS.VSCC.2003/commoner/redir/redirect.htm? keyword=&quot;jlca1000_javaioPipedOutputStreamPipedOutputStream (or online at http://msdn2.microsoft.com/en-us/library/Aa669343(VS.71).aspx) is as follows:

In Visual J++, this constructor creates a piped output stream that is not yet connected to a piped input stream.

In the .NET Framework, the equivalent is the System.IO.StreamReader class, but it has no empty constructor.

To correct this error
 * Use StreamReader by specifying an input stream.



RESOLUTION
In the Microsoft .NET Framework, the equivalent of java.io.PipedOutputStream is System.IO.StreamWriter, not System.IO.StreamReader. The Help topic should read as follows:

In Visual J++, this constructor creates a piped output stream that is not yet connected to a piped input stream.

In the .NET Framework, the equivalent is the System.IO.StreamWriter class, but it has no empty constructor.

To correct this error
 * Use StreamWriter by specifying an input stream.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
 Start Visual J++ 6.0. On the File menu, click New Project. On the New tab, expand Visual J++ Projects, and then click Applications. In the right pane, click Console Application. Type MyVJTestApplication in the Name box, and then click Open.  Replace the existing code with the following code for Class1.java: import java.io.*; public class Class1 {   public static void main (String[] args) {       // Create a new PipedOutputStream object. PipedOutputStream myOutStream = new PipedOutputStream; } } </li> On the File menu, click Save All.</li> Quit Visual J++.</li> Start Microsoft Visual Studio .NET 2003 or Microsoft Visual Studio 2005.</li> On the File menu, point to Open, and then click Convert.</li> Click Java Language Conversion Assistant under Available Converters, and then click OK.</li> Follow the instructions in the JLCA Wizard to convert the Visual J++ project that you created.</li> In the code editor for Class1.cs, right-click '''ms-help://MS.VSCC.2003/commoner/redir/redirect.htm? keyword=&quot;jlca1000_javaioPipedOutputStreamPipedOutputStream, and then click Open URL'''.</li></ol>

<div class="references_section">