Inheritance: global::java.lang.Object, global::java.io.Closeable, global::java.io.Flushable
 public static void writeChartAsPNG(OutputStream @out, JFreeChart chart, int width, int height, ChartRenderingInfo info, bool encodeAlpha, int compression)
 {
   int num = encodeAlpha ? 1 : 0;
   if (@out == null)
   {
     string str = "Null 'out' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (chart == null)
   {
     string str = "Null 'chart' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     BufferedImage bufferedImage = chart.createBufferedImage(width, height, 2, info);
     ChartUtilities.writeBufferedImageAsPNG(@out, bufferedImage, num != 0, compression);
   }
 }
Beispiel #2
0
 public Piper(InputStream @is, OutputStream os)
 {
   base.\u002Ector();
   Piper piper = this;
   this.@is = @is;
   this.os = os;
 }
 public SimpleIOStream(InputStream @is, OutputStream os)
 {
   base.\u002Ector();
   SimpleIOStream simpleIoStream = this;
   this.@is = @is;
   this.os = os;
 }
 public static void writeChartAsPNG(OutputStream @out, JFreeChart chart, int width, int height, ChartRenderingInfo info)
 {
   if (chart == null)
   {
     string str = "Null 'chart' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
     EncoderUtil.writeBufferedImage(chart.createBufferedImage(width, height, info), "png", @out);
 }
 public virtual void encode(BufferedImage bufferedImage, OutputStream outputStream)
 {
   if (bufferedImage == null)
   {
     string str = "Null 'image' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (outputStream == null)
   {
     string str = "Null 'outputStream' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
     ImageIO.write((RenderedImage) bufferedImage, "png", outputStream);
 }
Beispiel #6
0
        public void Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
        {
            //TBD: implement encoderParams
            if (encoder == null)
            {
                throw new ArgumentNullException("Value cannot be null.");
            }

            try {
                java.io.OutputStream         jos    = vmw.common.IOUtils.ToOutputStream(stream);
                MemoryCacheImageOutputStream output = new MemoryCacheImageOutputStream(jos);
                InternalSave(output, encoder.Clsid);
                output.flush();
            }
            catch (java.io.IOException ex) {
                throw new System.IO.IOException(ex.Message, ex);
            }
        }
Beispiel #7
0
		public virtual void setOutput (OutputStream os, string encoding)
		{
			if (os == null) {
				throw new ArgumentException ();
			}
			if (true) {
				try {
					mCharset = Charset.forName (encoding).newEncoder ();
				} catch (IllegalCharsetNameException e) {
					throw new UnsupportedEncodingException (encoding, e);
				} catch (UnsupportedCharsetException e) {
					throw new UnsupportedEncodingException (encoding, e);
				}
				mOutputStream = os;
			} else {
				setOutput (encoding == null ? new OutputStreamWriter (os) : new OutputStreamWriter
					(os, encoding));
			}
		}
 public virtual void encode(BufferedImage bufferedImage, OutputStream outputStream)
 {
   if (bufferedImage == null)
   {
     string str = "Null 'image' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (outputStream == null)
   {
     string str = "Null 'outputStream' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     PngEncoder.__\u003Cclinit\u003E();
     PngEncoder pngEncoder = new PngEncoder((Image) bufferedImage, this.encodingAlpha, 0, this.quality);
     outputStream.write(pngEncoder.pngEncode());
   }
 }
		/// <summary>
		/// Set the ByteStream that is to be written to.
		/// </summary>
		public void setOutputStream(OutputStream @outputStream)
		{
		}
 public virtual void save(OutputStream outStream, Configuration config)
 {
   ArrayList arrayList = new ArrayList();
   Iterator propertyKeys = config.findPropertyKeys("");
   while (propertyKeys.hasNext())
   {
     string str = (string) propertyKeys.next();
     arrayList.add((object) str);
   }
   Collections.sort((List) arrayList);
   OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outStream, "iso-8859-1");
   for (int index = 0; index < arrayList.size(); ++index)
   {
     string str = (string) arrayList.get(index);
     string configProperty = config.getConfigProperty(str);
     string description = this.getDescription(str);
     if (description != null)
       this.writeDescription(description, (Writer) outputStreamWriter);
     this.saveConvert(str, 0, (Writer) outputStreamWriter);
     ((Writer) outputStreamWriter).write("=");
     this.saveConvert(configProperty, 1, (Writer) outputStreamWriter);
     ((Writer) outputStreamWriter).write(SortedConfigurationWriter.END_OF_LINE);
   }
   outputStreamWriter.flush();
 }
		/// <summary>
		/// Construct a StreamResult from a sbyte stream.
		/// </summary>
		public StreamResult(OutputStream @outputStream)
		{
		}
Beispiel #12
0
        /// <summary>
        /// Creates a new print stream.
        /// </summary>
        /// <param name="out">        The output stream to which values and objects will be
        ///                    printed </param>
        /// <param name="autoFlush">  A boolean; if true, the output buffer will be flushed
        ///                    whenever a byte array is written, one of the
        ///                    <code>println</code> methods is invoked, or a newline
        ///                    character or byte (<code>'\n'</code>) is written </param>
        /// <param name="encoding">   The name of a supported
        ///                    <a href="../lang/package-summary.html#charenc">
        ///                    character encoding</a>
        /// </param>
        /// <exception cref="UnsupportedEncodingException">
        ///          If the named encoding is not supported
        ///
        /// @since  1.4 </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public PrintStream(OutputStream out, boolean autoFlush, String encoding) throws UnsupportedEncodingException
        public PrintStream(OutputStream @out, bool autoFlush, String encoding) : this(autoFlush, RequireNonNull(@out, "Null output stream"), ToCharset(encoding))
        {
        }
        public DataOutputStream(OutputStream o): base(o)
        {

        }
 public static void writeScaledChartAsPNG(OutputStream @out, JFreeChart chart, int width, int height, int widthScaleFactor, int heightScaleFactor)
 {
   if (@out == null)
   {
     string str = "Null 'out' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (chart == null)
   {
     string str = "Null 'chart' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     double num1 = (double) (width * widthScaleFactor);
     double num2 = (double) (height * heightScaleFactor);
     double num3 = (double) width;
     double num4 = (double) height;
     int num5 = 0;
     if (widthScaleFactor != 1 || heightScaleFactor != 1)
       num5 = 1;
     double num6 = num1 / num3;
     double num7 = num2 / num4;
     BufferedImage image = new BufferedImage(ByteCodeHelper.d2i(num1), ByteCodeHelper.d2i(num2), 2);
     Graphics2D graphics = image.createGraphics();
     if (num5 != 0)
     {
       AffineTransform transform = graphics.getTransform();
       graphics.transform(AffineTransform.getScaleInstance(num6, num7));
       chart.draw(graphics, (Rectangle2D) new Rectangle2D.Double(0.0, 0.0, num3, num4), (Point2D) null, (ChartRenderingInfo) null);
       graphics.setTransform(transform);
       ((Graphics) graphics).dispose();
     }
     else
       chart.draw(graphics, (Rectangle2D) new Rectangle2D.Double(0.0, 0.0, num3, num4), (Point2D) null, (ChartRenderingInfo) null);
     @out.write(ChartUtilities.encodeAsPNG(image));
   }
 }
Beispiel #15
0
        /* Variant of the private constructor so that the given charset name
         * can be verified before evaluating the OutputStream argument. Used
         * by constructors creating a FileOutputStream that also take a
         * charset name.
         */
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private PrintStream(boolean autoFlush, java.nio.charset.Charset charset, OutputStream out) throws UnsupportedEncodingException
        private PrintStream(bool autoFlush, Charset charset, OutputStream @out) : this(autoFlush, @out, charset)
        {
        }
Beispiel #16
0
 /// <summary>
 /// Creates a new print stream.
 /// </summary>
 /// <param name="out">        The output stream to which values and objects will be
 ///                    printed </param>
 /// <param name="autoFlush">  A boolean; if true, the output buffer will be flushed
 ///                    whenever a byte array is written, one of the
 ///                    <code>println</code> methods is invoked, or a newline
 ///                    character or byte (<code>'\n'</code>) is written
 /// </param>
 /// <seealso cref= java.io.PrintWriter#PrintWriter(java.io.OutputStream, boolean) </seealso>
 public PrintStream(OutputStream @out, bool autoFlush) : this(autoFlush, RequireNonNull(@out, "Null output stream"))
 {
 }
		/// <summary>
		/// Creates an output stream filter built on top of the specified
		/// underlying output stream.
		/// </summary>
		public FilterOutputStream(OutputStream @out)
		{
		}
 public static void writeBufferedImageAsJPEG(OutputStream @out, float quality, BufferedImage image)
 {
   EncoderUtil.writeBufferedImage(image, "jpeg", @out, quality);
 }
		/// <summary>
		/// Writes content from a document to the given stream
		/// in a format appropriate for this kind of content handler.
		/// </summary>
		abstract public void write(OutputStream @out, Document @doc, int @pos, int @len);
 public static void writeBufferedImageAsPNG(OutputStream @out, BufferedImage image)
 {
   EncoderUtil.writeBufferedImage(image, "png", @out);
 }
 public static void writeBufferedImageAsJPEG(OutputStream @out, BufferedImage image)
 {
   ChartUtilities.writeBufferedImageAsJPEG(@out, 0.75f, image);
 }
 public static void writeChartAsJPEG(OutputStream @out, float quality, JFreeChart chart, int width, int height)
 {
   ChartUtilities.writeChartAsJPEG(@out, quality, chart, width, height, (ChartRenderingInfo) null);
 }
 public DataOutputStream(OutputStream @out)
 {
     //super(@out);
     this.@out = @out;
 }
 // Constructor Summary
 /// <summary>
 /// Create an OutputStreamWriter that uses the default character encoding.
 /// </summary>
 public OutputStreamWriter(OutputStream _out)
 {
 }
 /// <summary>
 /// Writes the complete contents of this sbyte array output stream to the specified output stream argument, as if by calling the output stream's write method using
 /// </summary>
 public void writeTo(OutputStream _out)
 {
     return;
 }
 public static void writeChartAsPNG(OutputStream @out, JFreeChart chart, int width, int height, bool encodeAlpha, int compression)
 {
   int num = encodeAlpha ? 1 : 0;
   ChartUtilities.writeChartAsPNG(@out, chart, width, height, (ChartRenderingInfo) null, num != 0, compression);
 }
Beispiel #27
0
 private static void CopyStream(InputStream source, OutputStream destination)
 {
     sbyte[] b = new sbyte[0x1f40];
 Label_000B:
     try
     {
         int count = source.read(b, 0, b.Length);
         if (count > 0)
         {
             destination.write(b, 0, count);
             goto Label_000B;
         }
     }
     catch (Exception exception)
     {
         string message = exception.Message;
         goto Label_000B;
     }
 }
Beispiel #28
0
 /// <summary>
 /// Creates a new print stream.  This stream will not flush automatically.
 /// </summary>
 /// <param name="out">        The output stream to which values and objects will be
 ///                    printed
 /// </param>
 /// <seealso cref= java.io.PrintWriter#PrintWriter(java.io.OutputStream) </seealso>
 public PrintStream(OutputStream @out) : this(@out, false)
 {
 }
 public static void writeBufferedImageAsPNG(OutputStream @out, BufferedImage image, bool encodeAlpha, int compression)
 {
   int num = encodeAlpha ? 1 : 0;
   EncoderUtil.writeBufferedImage(image, "png", @out, (float) compression, num != 0);
 }
Beispiel #30
0
 public CustomPrintWriter(OutputStream @out)
     : base(@out, true)
 {
 }
Beispiel #31
0
        // X:\jsc.svn\examples\javascript\android\com.abstractatech.dcimgalleryapp\com.abstractatech.dcimgalleryapp\ApplicationWebService.cs


        public bool compress(CompressFormat format, int quality, OutputStream stream)
        {
            return default(bool);
        }
Beispiel #32
0
 public virtual void copyStreams(InputStream @in, OutputStream @out, int buffersize)
 {
   byte[] numArray = new byte[buffersize];
   for (int index = @in.read(numArray); index > -1; index = @in.read(numArray))
     @out.write(numArray, 0, index);
 }
 public ServletOutputStreamAdapter(OutputStream @out, Encoding encoding)
 {
     _out = @out;
     _encoding = encoding;
 }
Beispiel #34
0
 public virtual void copyStreams(InputStream @in, OutputStream @out)
 {
   this.copyStreams(@in, @out, 4096);
 }
Beispiel #35
0
 /// <summary>
 /// 
 /// </summary>
 public OutputStream getLocalizedOutputStream(OutputStream @out)
 {
     return default(OutputStream);
 }
Beispiel #36
0
 private PrintStream(bool autoFlush, OutputStream @out, Charset charset) : base(@out)
 {
     this.AutoFlush = autoFlush;
     this.CharOut   = new OutputStreamWriter(this, charset);
     this.TextOut   = new BufferedWriter(CharOut);
 }