Inheritance: global::java.lang.Object, global::java.io.Closeable, global::java.io.Flushable
コード例 #1
1
 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);
   }
 }
コード例 #2
0
ファイル: Piper.cs プロジェクト: NALSS/SmartDashboard.NET
 public Piper(InputStream @is, OutputStream os)
 {
   base.\u002Ector();
   Piper piper = this;
   this.@is = @is;
   this.os = os;
 }
コード例 #3
0
 public SimpleIOStream(InputStream @is, OutputStream os)
 {
   base.\u002Ector();
   SimpleIOStream simpleIoStream = this;
   this.@is = @is;
   this.os = os;
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 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);
 }
コード例 #6
0
ファイル: Image.jvm.cs プロジェクト: pmq20/mono_forked
        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);
            }
        }
コード例 #7
0
ファイル: FastXmlSerializer.cs プロジェクト: hakeemsm/XobotOS
		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));
			}
		}
コード例 #8
0
 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());
   }
 }
コード例 #9
0
		/// <summary>
		/// Set the ByteStream that is to be written to.
		/// </summary>
		public void setOutputStream(OutputStream @outputStream)
		{
		}
コード例 #10
0
 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();
 }
コード例 #11
0
		/// <summary>
		/// Construct a StreamResult from a sbyte stream.
		/// </summary>
		public StreamResult(OutputStream @outputStream)
		{
		}
コード例 #12
0
ファイル: PrintStream.cs プロジェクト: ranganathsb/JavaSharp
        /// <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))
        {
        }
コード例 #13
0
        public DataOutputStream(OutputStream o): base(o)
        {

        }
コード例 #14
0
 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));
   }
 }
コード例 #15
0
ファイル: PrintStream.cs プロジェクト: ranganathsb/JavaSharp
        /* 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)
        {
        }
コード例 #16
0
ファイル: PrintStream.cs プロジェクト: ranganathsb/JavaSharp
 /// <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"))
 {
 }
コード例 #17
0
		/// <summary>
		/// Creates an output stream filter built on top of the specified
		/// underlying output stream.
		/// </summary>
		public FilterOutputStream(OutputStream @out)
		{
		}
コード例 #18
0
 public static void writeBufferedImageAsJPEG(OutputStream @out, float quality, BufferedImage image)
 {
   EncoderUtil.writeBufferedImage(image, "jpeg", @out, quality);
 }
コード例 #19
0
		/// <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);
コード例 #20
0
 public static void writeBufferedImageAsPNG(OutputStream @out, BufferedImage image)
 {
   EncoderUtil.writeBufferedImage(image, "png", @out);
 }
コード例 #21
0
 public static void writeBufferedImageAsJPEG(OutputStream @out, BufferedImage image)
 {
   ChartUtilities.writeBufferedImageAsJPEG(@out, 0.75f, image);
 }
コード例 #22
0
 public static void writeChartAsJPEG(OutputStream @out, float quality, JFreeChart chart, int width, int height)
 {
   ChartUtilities.writeChartAsJPEG(@out, quality, chart, width, height, (ChartRenderingInfo) null);
 }
コード例 #23
0
 public DataOutputStream(OutputStream @out)
 {
     //super(@out);
     this.@out = @out;
 }
コード例 #24
0
 // Constructor Summary
 /// <summary>
 /// Create an OutputStreamWriter that uses the default character encoding.
 /// </summary>
 public OutputStreamWriter(OutputStream _out)
 {
 }
コード例 #25
0
 /// <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;
 }
コード例 #26
0
 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);
 }
コード例 #27
0
ファイル: Compression.cs プロジェクト: micheljung/gpgnetfix
 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;
     }
 }
コード例 #28
0
ファイル: PrintStream.cs プロジェクト: ranganathsb/JavaSharp
 /// <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)
 {
 }
コード例 #29
0
 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);
 }
コード例 #30
0
ファイル: CustomPrintWriter.cs プロジェクト: 02ps719/SolrIKVM
 public CustomPrintWriter(OutputStream @out)
     : base(@out, true)
 {
 }
コード例 #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);
        }
コード例 #32
0
ファイル: IOUtils.cs プロジェクト: NALSS/SmartDashboard.NET
 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);
 }
コード例 #33
0
 public ServletOutputStreamAdapter(OutputStream @out, Encoding encoding)
 {
     _out = @out;
     _encoding = encoding;
 }
コード例 #34
0
ファイル: IOUtils.cs プロジェクト: NALSS/SmartDashboard.NET
 public virtual void copyStreams(InputStream @in, OutputStream @out)
 {
   this.copyStreams(@in, @out, 4096);
 }
コード例 #35
0
 /// <summary>
 /// 
 /// </summary>
 public OutputStream getLocalizedOutputStream(OutputStream @out)
 {
     return default(OutputStream);
 }
コード例 #36
0
ファイル: PrintStream.cs プロジェクト: ranganathsb/JavaSharp
 private PrintStream(bool autoFlush, OutputStream @out, Charset charset) : base(@out)
 {
     this.AutoFlush = autoFlush;
     this.CharOut   = new OutputStreamWriter(this, charset);
     this.TextOut   = new BufferedWriter(CharOut);
 }