@Test(expected = IllegalArgumentException.class) public void testThrowForAction() throws IOException { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); Slice s = new Slice.Builder(Uri.parse("content: .addAction((PendingIntent) null, null, null) .build(); SliceUtils.serializeSlice(s, mContext, outputStream, "UTF-8", new SliceUtils .SerializeOptions()); }
public static void serializeSlice(Slice s, Context context, OutputStream output, String encoding, SliceUtils.SerializeOptions options) throws IOException { try { XmlSerializer serializer = XmlPullParserFactory.newInstance().newSerializer(); serializer.setOutput(output, encoding); serializer.startDocument(encoding, null); serialize(s, context, options, serializer, false, null); serializer.endDocument(); serializer.flush(); } catch (XmlPullParserException e) { throw new IOException("Unable to init XML Serialization", e); } }
SliceXml { public static void serializeSlice(Slice s, Context context, OutputStream output, String encoding, SliceUtils.SerializeOptions options) throws IOException { try { XmlSerializer serializer = XmlPullParserFactory.newInstance().newSerializer(); serializer.setOutput(output, encoding); serializer.startDocument(encoding, null); serialize(s, context, options, serializer, false, null); serializer.endDocument(); serializer.flush(); } catch (XmlPullParserException e) { throw new IOException("Unable to init XML Serialization", e); } } }
SliceXml { public static void serializeSlice(Slice s, Context context, OutputStream output, String encoding, SliceUtils.SerializeOptions options) throws IOException { try { XmlSerializer serializer = XmlPullParserFactory.newInstance().newSerializer(); serializer.setOutput(output, encoding); serializer.startDocument(encoding, null); serialize(s, context, options, serializer, false, null); serializer.endDocument(); serializer.flush(); } catch (XmlPullParserException e) { throw new IOException("Unable to init XML Serialization", e); } } private  SliceXml(); }
SliceXml { public static void serializeSlice(Slice s, Context context, OutputStream output, String encoding, SliceUtils.SerializeOptions options) throws IOException { try { XmlSerializer serializer = XmlPullParserFactory.newInstance().newSerializer(); serializer.setOutput(output, encoding); serializer.startDocument(encoding, null); serialize(s, context, options, serializer, false, null); serializer.endDocument(); serializer.flush(); } catch (XmlPullParserException e) { throw new IOException("Unable to init XML Serialization", e); } } private  SliceXml(); static Slice parseSlice(Context context, InputStream input,
            String encoding, SliceUtils.SliceActionListener listener); static void serializeSlice(Slice s, Context context, OutputStream output,
            String encoding, SliceUtils.SerializeOptions options); }
SliceXml { public static void serializeSlice(Slice s, Context context, OutputStream output, String encoding, SliceUtils.SerializeOptions options) throws IOException { try { XmlSerializer serializer = XmlPullParserFactory.newInstance().newSerializer(); serializer.setOutput(output, encoding); serializer.startDocument(encoding, null); serialize(s, context, options, serializer, false, null); serializer.endDocument(); serializer.flush(); } catch (XmlPullParserException e) { throw new IOException("Unable to init XML Serialization", e); } } private  SliceXml(); static Slice parseSlice(Context context, InputStream input,
            String encoding, SliceUtils.SliceActionListener listener); static void serializeSlice(Slice s, Context context, OutputStream output,
            String encoding, SliceUtils.SerializeOptions options);  }