Package com.mozilla.grouperfish.base.json

Examples of com.mozilla.grouperfish.base.json.MapStreamer


            this.expected = out;
        }
    }

    private void check(Map<String, String> in, String expected) throws IOException {
        MapStreamer streamer = new MapStreamer(in);
        final ByteArrayOutputStream out = new ByteArrayOutputStream();
        streamer.write(out);
        assertEquals(expected, out.toString("UTF-8"));
    }
View Full Code Here


                            final Scope ns,
                            final HttpServletRequest request) {

        if (!ns.allows(resourceType, new HttpAccess(Operation.LIST, request))) return FORBIDDEN;

        final MapStreamer streamer = new MapStreamer(ns.resourceMap(resourceType));

        return Response.ok(
                new StreamingOutput() {
                    @Override
                    public void write(OutputStream output) throws IOException, WebApplicationException {
                        streamer.write(output);
                    }
                },
                MediaType.APPLICATION_JSON
            ).build();
    }
View Full Code Here

TOP

Related Classes of com.mozilla.grouperfish.base.json.MapStreamer

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.