Inheritance: java.lang.Object, Closeable
 public TCPImageFetcher(int teamNumber)
 {
   base.\u002Ector();
   TCPImageFetcher tcpImageFetcher = this;
   this.m_sock = (Socket) null;
   this.m_sockistream = (InputStream) null;
   this.m_imgBuffer = (byte[]) null;
   this.m_maxImgBufferSize = 0;
   this.m_baistream = (ByteArrayInputStream) null;
   this.m_daistream = (DataInputStream) null;
   this.m_initialized = false;
   this.m_address = (byte[]) null;
   int num1 = (int) (sbyte) (teamNumber / 100);
   int num2 = teamNumber;
   int num3 = 100;
   int num4 = -1;
   int num5 = num3 != num4 ? (int) (sbyte) (num2 % num3) : 0;
   byte[] numArray = new byte[4];
   int index1 = 0;
   int num6 = 10;
   numArray[index1] = (byte) num6;
   int index2 = 1;
   int num7 = num1;
   numArray[index2] = (byte) num7;
   int index3 = 2;
   int num8 = num5;
   numArray[index3] = (byte) num8;
   int index4 = 3;
   int num9 = 2;
   numArray[index4] = (byte) num9;
   this.m_address = numArray;
 }
Esempio n. 2
0
    public static CategoryDataset readCategoryDatasetFromXML(InputStream @in)
    {
      CategoryDataset categoryDataset = (CategoryDataset) null;
      SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
      SAXException saxException;
      ParserConfigurationException configurationException;
      try
      {
        try
        {
          SAXParser saxParser = saxParserFactory.newSAXParser();
          CategoryDatasetHandler categoryDatasetHandler = new CategoryDatasetHandler();
          saxParser.parse(@in, (DefaultHandler) categoryDatasetHandler);
          categoryDataset = categoryDatasetHandler.getDataset();
          goto label_6;
        }
        catch (SAXException ex)
        {
          int num = 1;
          saxException = (SAXException) ByteCodeHelper.MapException<SAXException>((Exception) ex, (ByteCodeHelper.MapFlags) num);
        }
      }
      catch (ParserConfigurationException ex)
      {
        int num = 1;
        configurationException = (ParserConfigurationException) ByteCodeHelper.MapException<ParserConfigurationException>((Exception) ex, (ByteCodeHelper.MapFlags) num);
        goto label_5;
      }
      System.get_out().println(saxException.getMessage());
      goto label_6;
label_5:
      System.get_out().println(Throwable.instancehelper_getMessage((Exception) configurationException));
label_6:
      return categoryDataset;
    }
Esempio n. 3
0
 public Piper(InputStream @is, OutputStream os)
 {
   base.\u002Ector();
   Piper piper = this;
   this.@is = @is;
   this.os = os;
 }
 public virtual void load(InputStream @in)
 {
   if (@in == null)
   {
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new NullPointerException();
   }
   else
   {
     IOException ioException;
     try
     {
       BufferedInputStream bufferedInputStream = new BufferedInputStream(@in);
       Properties properties = new Properties();
       properties.load((InputStream) bufferedInputStream);
       ((Hashtable) this.getConfiguration()).putAll((Map) properties);
       bufferedInputStream.close();
       return;
     }
     catch (IOException ex)
     {
       int num = 1;
       ioException = (IOException) ByteCodeHelper.MapException<IOException>((Exception) ex, (ByteCodeHelper.MapFlags) num);
     }
     Log.warn((object) "Unable to read configuration", (Exception) ioException);
   }
 }
Esempio n. 5
0
 public SimpleIOStream(InputStream @is, OutputStream os)
 {
   base.\u002Ector();
   SimpleIOStream simpleIoStream = this;
   this.@is = @is;
   this.os = os;
 }
Esempio n. 6
0
 public void AddFontFile(string filename)
 {
     using (FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read)) {
         io.InputStream stream = vmw.common.IOUtils.ToInputStream(fs);
         awt.Font       font   = awt.Font.createFont(awt.Font.TRUETYPE_FONT, stream);
         AddFont(font);
     }
 }
 private void init()
 {
   this.m_sock = new Socket(InetAddress.getByAddress(this.m_address), 1180);
   this.m_sock.setSoTimeout(3000);
   this.m_sockistream = this.m_sock.getInputStream();
   this.m_daistream = new DataInputStream(this.m_sockistream);
   this.m_initialized = true;
 }
Esempio n. 8
0
        public void Load(Stream stream)
        {
            //FileInputStream stream = new FileInputStream(filePath);
            java.io.InputStream _javaStream = DroolsDotnetUtil.getJavaInputStreamFromSystemStream(stream);
            ObjectInput         objInp      = new ObjectInputStream(_javaStream);

            this._javaPackage.readExternal(objInp);
            _javaStream.close();
        }
Esempio n. 9
0
            public Reader resolve(URI absoluteURI, string encoding, Configuration config)
            {
                if (encoding == null)
                {
                    encodings.TryGetValue(new Uri(absoluteURI.ToString()), out encoding);
                }
                if (encoding == null)
                {
                    encoding = "utf-8";
                }
                try
                {
                    // The following is necessary to ensure that encoding errors are not recovered.
                    java.nio.charset.Charset        charset = java.nio.charset.Charset.forName(encoding);
                    java.nio.charset.CharsetDecoder decoder = charset.newDecoder();
                    decoder = decoder.onMalformedInput(java.nio.charset.CodingErrorAction.REPORT);
                    decoder = decoder.onUnmappableCharacter(java.nio.charset.CodingErrorAction.REPORT);
                    Object obj;
                    resources.TryGetValue(new Uri(absoluteURI.ToString()), out obj);
                    if (obj is java.io.File)
                    {
                        return(new BufferedReader(new InputStreamReader(new FileInputStream((java.io.File)obj), decoder)));
                    }
                    else
                    {
                        resources.TryGetValue(new Uri(absoluteURI.ToString()), out obj);
                        URL resource = (URL)obj;
                        if (resource == null)
                        {
                            resource = absoluteURI.toURL();
                            //throw new XPathException("Unparsed text resource " + absoluteURI + " not registered in catalog", "FOUT1170");
                        }
                        java.io.InputStream in1 = resource.openConnection().getInputStream();
                        return(new BufferedReader(new InputStreamReader(in1, decoder)));
                    }
                    //   return new InputStreamReader(new FileInputStream(resources.get(absoluteURI)), encoding);
                }
                catch (java.lang.Exception ioe)
                {
                    throw new Exception(ioe.getMessage() + "FOUT1170");
                }

                /*catch (IllegalCharsetNameException icne)
                 * {
                 *  throw new XPathException("Invalid encoding name: " + encoding, "FOUT1190");
                 * }
                 * catch (UnsupportedCharsetException uce)
                 * {
                 *  throw new XPathException("Invalid encoding name: " + encoding, "FOUT1190");
                 * }*/
            }
Esempio n. 10
0
 public Document build(InputStream inputStream)
 {
     try
     {
         var streamWrapper = new util.io.StreamWrapper(inputStream);
         TextReader textReader = new StreamReader(streamWrapper);
         var xDocument = XDocument.Load(textReader);
         inputStream.close();
         return new Document(xDocument);
     }
     catch (Exception exception)
     {
         throw new ParsingException(exception);
     }
 }
Esempio n. 11
0
        private void initializeCustom()
        {
            // IMPORTANT NOTE: Always use the single argument version of Logging.logger in this method because the non-arg
            // method assumes an instance of Configuration already exists.

            String configFileName = System.getProperty(CONFIG_FILE_PROPERTY_KEY, CONFIG_PROPERTIES_FILE_NAME);

            try
            {
                java.io.InputStream propsStream = null;
                File file = new File(configFileName);
                if (file.exists())
                {
                    try
                    {
                        propsStream = new FileInputStream(file);
                    }
                    catch (FileNotFoundException e)
                    {
                        Logging.logger(DEFAULT_LOGGER_NAME).log(Level.FINEST, "Configuration.LocalConfigFileNotFound",
                                                                configFileName);
                    }
                }

                if (propsStream == null)
                {
                    propsStream = this.GetType().getResourceAsStream("/" + configFileName);
                }

                if (propsStream != null)
                {
                    this.properties.load(propsStream);
                }
            }
            // Use a named logger in all the catch statements below to prevent Logger from calling back into
            // Configuration when this Configuration instance is not yet fully instantiated.
            catch (IOException e)
            {
                Logging.logger(DEFAULT_LOGGER_NAME).log(Level.SEVERE, "Configuration.ExceptionReadingPropsFile", e);
            }
        }
        public override void add(InputStream @is, string str, org.openrdf.rio.RDFFormat rdff, params org.openrdf.model.Resource[] rarr)
        {
            if (this._manager.IsReadOnly) throw NotWritableError("add");

            base.add(@is, str, rdff, rarr);
        }
Esempio n. 13
0
 /// <param name="inputStream"> Input stream to read from. </param>
 public MessageInput(java.io.InputStream inputStream)
 {
     this.countingInputStream = new CountingInputStream(inputStream);
     this.dataInputStream     = new DataInputStream(inputStream);
 }
Esempio n. 14
0
		/// <summary>
		/// Inserts content from the given stream which is expected
		/// to be in a format appropriate for this kind of content
		/// handler.
		/// </summary>
		abstract public void read(InputStream @in, Document @doc, int @pos);
Esempio n. 15
0
			/// <exception cref="System.IO.IOException"></exception>
			public ConsoleReader (InputStream @in) :
				base (new InputStreamReader (@in), 256)
			{
				@lock = CONSOLE_LOCK;
			}
Esempio n. 16
0
		/// <summary>
		/// Obtains the audio file format of the provided input stream.
		/// </summary>
		static public AudioFileFormat getAudioFileFormat(InputStream @stream)
		{
			return default(AudioFileFormat);
		}
 //    private boolean enableResolve;
 //private SerialCallbackContext curContext;
 public ObjectInputStream(InputStream @in)
 {
     //verifySubclass();
     bin = new BlockDataInputStream(@in);
     handles = new HandleTable(10);
     //vlist = new ValidationList();
     enableOverride = false;
     readStreamHeader();
     bin.setBlockDataMode(true);
 }
 public static Document load(InputStream stream) {
     return newDocumentBuilder().parse(new InputSource(stream));
 }
Esempio n. 19
0
 public void copyTo(Resource resource, InputStream inputStream)
 {
     this.m_CopiedResources.Add(resource);
 }
 internal BlockDataInputStream(InputStream @in)
 {
     this.@in = new PeekInputStream(@in);
     din = new DataInputStream(this);
 }
Esempio n. 21
0
 public virtual void copyStreams(InputStream @in, OutputStream @out)
 {
   this.copyStreams(@in, @out, 4096);
 }
Esempio n. 22
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);
 }
Esempio n. 23
0
        public static Object LoadFromStream(InputStream @is, string baseUri, org.openrdf.rio.RDFFormat rdff)
        {
            Object obj;

            if (rdff == dotSesameFormats.RDFFormat.N3)
            {
                obj = new Graph();
                if (baseUri != null) ((IGraph)obj).BaseUri = new Uri(baseUri);
                Notation3Parser parser = new Notation3Parser();
                parser.Load((IGraph)obj, @is.ToDotNetReadableStream());
            }
            else if (rdff == dotSesameFormats.RDFFormat.NTRIPLES)
            {
                obj = new Graph();
                if (baseUri != null) ((IGraph)obj).BaseUri = new Uri(baseUri);
                NTriplesParser parser = new NTriplesParser();
                parser.Load((IGraph)obj, @is.ToDotNetReadableStream());
            }
            else if (rdff == dotSesameFormats.RDFFormat.RDFXML)
            {
                obj = new Graph();
                if (baseUri != null) ((IGraph)obj).BaseUri = new Uri(baseUri);
                RdfXmlParser parser = new RdfXmlParser();
                parser.Load((IGraph)obj, @is.ToDotNetReadableStream());
            }
            else if (rdff == dotSesameFormats.RDFFormat.TRIG)
            {
                obj = new TripleStore();
                TriGParser trig = new TriGParser();
                trig.Load((ITripleStore)obj, new StreamParams(@is.ToDotNetReadableStream().BaseStream));
            }
            else if (rdff == dotSesameFormats.RDFFormat.TRIX)
            {
                obj = new TripleStore();
                TriXParser trix = new TriXParser();
                trix.Load((ITripleStore)obj, new StreamParams(@is.ToDotNetReadableStream().BaseStream));
            }
            else if (rdff == dotSesameFormats.RDFFormat.TURTLE)
            {
                obj = new Graph();
                if (baseUri != null) ((IGraph)obj).BaseUri = new Uri(baseUri);
                TurtleParser parser = new TurtleParser();
                parser.Load((IGraph)obj, @is.ToDotNetReadableStream());
            }
            else
            {
                throw new RdfParserSelectionException("The given Input Format is not supported by dotNetRDF");
            }

            return obj;
        }
        public ZipInputStream(InputStream @in)
        {

        }
Esempio n. 25
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;
     }
 }
		public Certificate generateCertificate(InputStream inStream)
		{
			return default(Certificate);
		}
 public DataInputStream(InputStream @in) {
     //super(@in);
     this.@in = @in;
 }
Esempio n. 28
0
		/// <summary>
		/// This method initializes from a stream.
		/// </summary>
		public void read(InputStream @in, object @desc)
		{
		}
        public DataInputStream(InputStream e)
        {

        }
Esempio n. 30
0
		/// <summary>
		/// Obtains an audio input stream from the provided input stream.
		/// </summary>
		static public AudioInputStream getAudioInputStream(InputStream @stream)
		{
			return default(AudioInputStream);
		}
 public ServletInputStreamAdapter(InputStream @in)
 {
     _in = @in;
 }
 internal PeekInputStream(InputStream @in)
 {
     this.@in = @in;
 }
 public virtual void add(InputStream @is, string str, org.openrdf.rio.RDFFormat rdff, params org.openrdf.model.Resource[] rarr)
 {
     Object obj = SesameHelper.LoadFromStream(@is, str, rdff);
     IEnumerable<Uri> contexts = rarr.ToContexts(this._mapping);
     this.AddInternal(obj, contexts);
 }
Esempio n. 34
0
 /// <summary>
 /// 
 /// </summary>
 public InputStream getLocalizedInputStream(InputStream @in)
 {
     return default(InputStream);
 }
		/// <summary>
		/// Constructs an audio input stream that has the requested format and length in sample frames,
		/// using audio data from the specified input stream.
		/// </summary>
		public AudioInputStream(InputStream @stream, AudioFormat @format, long @length)
		{
		}