Package org.jboss.resteasy.util

Examples of org.jboss.resteasy.util.InputStreamToByteArray


         try
         {
            InputStream is = request.getInputStream();
            if (isMarshalledEntity)
            {
               is = new InputStreamToByteArray(is);

            }
            ServerMessageBodyReaderContext messageBodyReaderContext = new ServerMessageBodyReaderContext(interceptors, reader, type,
                    genericType, annotations, mediaType, request
                    .getHttpHeaders().getRequestHeaders(), is, request);
            final Object obj = messageBodyReaderContext.proceed();
            if (isMarshalledEntity)
            {
               InputStreamToByteArray isba = (InputStreamToByteArray) is;
               final byte[] bytes = isba.toByteArray();
               return new MarshalledEntity()
               {
                  @Override
                  public byte[] getMarshalledBytes()
                  {
View Full Code Here


      try
      {
         InputStream is = streamFactory.getInputStream();
         if (isMarshalledEntity)
         {
            is = new InputStreamToByteArray(is);

         }

         final Object obj = new ClientMessageBodyReaderContext(messageBodyReaderInterceptors, reader1, useType,
                 useGeneric, this.annotations, media, getHeaders(), is, attributes)
                 .proceed();
         if (isMarshalledEntity)
         {
            InputStreamToByteArray isba = (InputStreamToByteArray) is;
            final byte[] bytes = isba.toByteArray();
            return new MarshalledEntity()
            {
               @Override
               public byte[] getMarshalledBytes()
               {
View Full Code Here

      }

      InputStream old = context.getInputStream();
      try
      {
         InputStreamToByteArray stream = new InputStreamToByteArray(old);
         context.setInputStream(stream);
         Object rtn = context.proceed();
         byte[] body = stream.toByteArray();

         if (verifier.getRepository() == null)
         {
            KeyRepository repository = (KeyRepository) context.getAttribute(KeyRepository.class.getName());
            if (repository == null)
View Full Code Here

      try
      {
         InputStream is = request.getInputStream();
         if (isMarshalledEntity)
         {
            is = new InputStreamToByteArray(is);

         }
         AbstractReaderInterceptorContext messageBodyReaderContext = new ServerReaderInterceptorContext(interceptors, factory, type,
                 genericType, annotations, mediaType, request
                 .getHttpHeaders().getRequestHeaders(), is, request);
         final Object obj = messageBodyReaderContext.proceed();
         if (isMarshalledEntity)
         {
            InputStreamToByteArray isba = (InputStreamToByteArray) is;
            final byte[] bytes = isba.toByteArray();
            return new MarshalledEntity()
            {
               @Override
               public byte[] getMarshalledBytes()
               {
View Full Code Here

         {
            throw new IllegalStateException("Input stream was empty, there is no entity");
         }
         if (isMarshalledEntity)
         {
            is = new InputStreamToByteArray(is);

         }

         ReaderInterceptor[] readerInterceptors = configuration.getReaderInterceptors(null, null);

         final Object obj = new ClientReaderInterceptorContext(readerInterceptors, configuration.getProviderFactory(), useType,
                 useGeneric, annotations, media, getStringHeaders(), is, properties)
                 .proceed();
         if (isMarshalledEntity)
         {
            InputStreamToByteArray isba = (InputStreamToByteArray) is;
            final byte[] bytes = isba.toByteArray();
            return new MarshalledEntity()
            {
               @Override
               public byte[] getMarshalledBytes()
               {
View Full Code Here

         {
            throw new ClientResponseFailure("Input stream was empty, there is no entity", this);
         }
         if (isMarshalledEntity)
         {
            is = new InputStreamToByteArray(is);

         }

         final Object obj = new ClientReaderInterceptorContext(readerInterceptors, providerFactory, useType,
                 useGeneric, this.annotations, media, getResponseHeaders(), is, attributes)
                 .proceed();
         if (isMarshalledEntity)
         {
            InputStreamToByteArray isba = (InputStreamToByteArray) is;
            final byte[] bytes = isba.toByteArray();
            return new MarshalledEntity()
            {
               @Override
               public byte[] getMarshalledBytes()
               {
View Full Code Here

      }

      InputStream old = context.getInputStream();
      try
      {
         InputStreamToByteArray stream = new InputStreamToByteArray(old);
         context.setInputStream(stream);
         Object rtn = context.proceed();
         byte[] body = stream.toByteArray();

         if (verifier.getRepository() == null)
         {
            KeyRepository repository = (KeyRepository) context.getProperty(KeyRepository.class.getName());
            if (repository == null)
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.util.InputStreamToByteArray

Copyright © 2018 www.massapicom. 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.