@Draft
    public Object[] recvPicture(Socket socket, String picture)
    {
        if (!FORMAT.matcher(picture).matches()) {
            throw new ZMQException(picture + " is not in expected format " + FORMAT.pattern(), ZError.EPROTO);
        }
        Object[] elements = new Object[picture.length()];
        for (int index = 0; index < picture.length(); index++) {
            char pattern = picture.charAt(index);
            switch (pattern) {
            case 'i': {
                elements[index] = Integer.valueOf(socket.recvStr());
                break;
            }
            case '1': {
                elements[index] = (0xff) & Integer.parseInt(socket.recvStr());
                break;
            }
            case '2': {
                elements[index] = (0xffff) & Integer.parseInt(socket.recvStr());
                break;
            }
            case '4': {
                elements[index] = (0xffffffff) & Integer.parseInt(socket.recvStr());
                break;
            }
            case '8': {
                elements[index] = Long.valueOf(socket.recvStr());
                break;
            }
            case 's': {
                elements[index] = socket.recvStr();
                break;
            }
            case 'b':
            case 'c': {
                elements[index] = socket.recv();
                break;
            }
            case 'f': {
                elements[index] = ZFrame.recvFrame(socket);

                break;
            }
            case 'm': {
                elements[index] = ZMsg.recvMsg(socket);
                break;
            }
            case 'z': {
                ZFrame zeroFrame = ZFrame.recvFrame(socket);
                if (zeroFrame == null || zeroFrame.size() > 0) {
                    throw new ZMQException("zero frame is not empty", ZError.EPROTO);
                }
                elements[index] = new ZFrame((byte[]) null);
                break;
            }
            default:
                assert (false) : "invalid picture element '" + pattern + "'";
            }
        }
        return elements;
    }
@Test(expected = ZMQException.class)
    public void testReceiveInvalidPictureFormat()
    {
        String picture = "x";
        pic.recvPicture(null, picture);
    }