Examples of readFrom()


Examples of java.io.File.readFrom()

        // Read raw data.
        Package.File readFile(String fname, InputStream in) throws IOException {

            Package.File file = pkg.new File(fname);
            file.readFrom(in);
            if (file.isDirectory() && file.getFileLength() != 0)
                throw new IllegalArgumentException("Non-empty directory: "+file.getFileName());
            return file;
        }
View Full Code Here

Examples of javax.ws.rs.ext.MessageBodyReader.readFrom()

                    genericType, annotations, mediaType);
            if (reader == null)
               throw new BadRequestException(
                       "Could not find message body reader for type: "
                               + genericType + " of content type: " + mediaType);
            return reader.readFrom(type, genericType, annotations, mediaType,
                    request.getHttpHeaders().getRequestHeaders(), request
                            .getInputStream());
         }
         else if (isCookie)
         {
View Full Code Here

Examples of javax.ws.rs.ext.MessageBodyReader.readFrom()

               {
                  try
                  {
                     MultivaluedMap<String, String> headers = context.getContainerRequest().getRequestHeaders();
                     p[i++] =
                        entityReader.readFrom(mp.getParameterClass(), mp.getGenericType(), mp.getAnnotations(),
                           contentType, headers, entityStream);
                  }
                  catch (Exception e)
                  {
                     if (LOG.isDebugEnabled())
View Full Code Here

Examples of net.sf.nfp.mini.data.Mucus.readFrom()

    while(enumeration.hasNextElement()) {
      int id = enumeration.nextRecordId();
      Mucus mucus = new Mucus();
      ByteArrayInputStream bin = new ByteArrayInputStream(rms.getRecord(id));
      DataInputStream in = new DataInputStream(bin);
      mucus.readFrom(in);
      mucus.setId(id);
      registry.addElement(mucus);
    }
    System.out.println("MucusUtils.loadFromRMS():"+registry);
    return registry;
View Full Code Here

Examples of net.timewalker.ffmq3.utils.Settings.readFrom()

       
        if (!queueTemplateDescriptor.canRead())
            throw new FFMQException("Cannot access queue template descriptor : "+queueTemplateDescriptor.getAbsolutePath(),"FS_ERROR");
       
        Settings queueSettings = new Settings();
        queueSettings.readFrom(queueTemplateDescriptor);
       
        return new QueueTemplate(queueSettings);
    }

    public TopicTemplate getTopicTemplate( String topicName ) throws JMSException
View Full Code Here

Examples of net.wimpi.modbus.msg.ModbusRequest.readFrom()

          //create request
          request = ModbusRequest.createModbusRequest(in);
          request.setHeadless();
          //read message
          m_ByteIn.reset(m_InBuffer, m_ByteInOut.size());
          request.readFrom(m_ByteIn);
        }
        done = true;
      } while (!done);
      return request;
    } catch (Exception ex) {
View Full Code Here

Examples of net.wimpi.modbus.msg.ModbusResponse.readFrom()

          //create request
          response = ModbusResponse.createModbusResponse(in);
          response.setHeadless();
          //read message
          m_ByteIn.reset(m_InBuffer, m_ByteInOut.size());
          response.readFrom(m_ByteIn);
        }
        done = true;
      } while (!done);
      return response;
    } catch (Exception ex) {
View Full Code Here

Examples of net.wimpi.modbusme.msg.ModbusRequest.readFrom()

        m_ByteIn.reset(buffer, (6 + bf));
        m_ByteIn.skip(7);
        int functionCode = m_ByteIn.readUnsignedByte();
        m_ByteIn.reset();
        req = ModbusRequest.createModbusRequest(functionCode);
        req.readFrom(m_ByteIn);
      }
      return req;
/*
      int transactionID = m_Input.readUnsignedShort();
      int protocolID = m_Input.readUnsignedShort();
View Full Code Here

Examples of net.wimpi.modbusme.msg.ModbusResponse.readFrom()

        m_ByteIn.reset(buffer, (6 + bf));
        m_ByteIn.skip(7);
        int functionCode = m_ByteIn.readUnsignedByte();
        m_ByteIn.reset();
        res = ModbusResponse.createModbusResponse(functionCode);
        res.readFrom(m_ByteIn);
      }
      return res;
      /*
       try {
         int transactionID = m_Input.readUnsignedShort();
View Full Code Here

Examples of org.apache.ambari.server.controller.internal.URLStreamProvider.readFrom()

              spec = rr.getBaseUrl() + suffix.substring(1);
            else
              spec = rr.getBaseUrl() + suffix;
           
            try {
              IOUtils.readLines(usp.readFrom(spec));
              bFound = true;
            } catch (IOException ioe) {
              LOG.error("IOException loading the base URL", ioe);
            }
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.